Xavier Noria
df508bd970
aliases Date#sunday to Date#end_of_week, for symmetry with existing alias Date#monday -> Date#beginning_of_week
2010-05-09 11:16:34 +02:00
Xavier Noria
2969543cef
adds calendar reform test coverage for more relevant date calculations
2010-05-09 10:26:21 +02:00
wycats
d916c62cfc
eliminate alias_method_chain from ActiveRecord
2010-05-09 02:37:52 +03:00
Xavier Noria
636ffa1f08
Backports Date#>> from 1.9 so that calculations do the right thing around the calendar reform
...
Our next_month gives November for some late dates in September of 1582.
Related methods, last_*, and in general advance have the same issues.
This commit fixes those, see the test suite for expected behavior, which
we still run in 1.9 to ensure it matches as we do with other methods
defined in Date in 1.9.
2010-05-09 01:20:23 +02:00
Josh Kalderimis
605c6455ac
removed AR from all AMo tests, including any unneeded files (schema, fixtures and test helper)
2010-05-09 00:08:11 +03:00
Josh Kalderimis
88ad3ed8b5
removed an old unused model in the AMo tests which also removes another AR dependency
2010-05-09 00:08:11 +03:00
Josh Kalderimis
e17ff6d617
updated AR to work with the AMo model validation changes
2010-05-08 23:51:36 +03:00
Josh Kalderimis
66913a76af
removed use of AR in AMo tests and removed testing of scopes (:on) in individual validation tests and moved them to their own test file
2010-05-08 23:51:36 +03:00
Josh Kalderimis
82485068f8
updated AMo validations to use a context for valid? and invalid?, removing the dependency on AR
2010-05-08 23:51:28 +03:00
Santiago Pastorino
0b4211c88b
Here the intention was to assign to different objects
2010-05-08 23:29:51 +03:00
Xavier Noria
7184a9e643
add test coverage for (last|next)_year on leap years
2010-05-08 18:46:15 +02:00
Sam Ruby
788684d75a
get the rescue error page back [ #4536 state:resolved]
2010-05-08 17:55:51 +02:00
José Valim
6626833db1
Revert "Add index length support for MySQL [ #1852 state:open]"
...
This commit breaks dumping a few tables, as the sessions table.
To reproduce, just create a new application and:
rake db:sessions:create
rake db:migrate
rake db:test:prepare
And then look at the db/schema.rb file (ht: Sam Ruby).
This reverts commit 5b95730edc .
2010-05-08 17:46:39 +03:00
Emili Parreno
5b95730edc
Add index length support for MySQL [ #1852 state:resolved]
...
Example:
add_index(:accounts, :name, :name => 'by_name', :length => 10)
=> CREATE INDEX by_name ON accounts(name(10))
add_index(:accounts, [:name, :surname], :name => 'by_name_surname', :length => {:name => 10, :surname => 15})
=> CREATE INDEX by_name_surname ON accounts(name(10), surname(15))
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2010-05-08 12:39:46 +01:00
Santiago Pastorino
9aaef59356
Make find_or_create and find_or_initialize work mixing explicit parameters and a hash [ #4457 state:committed]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-07 09:40:02 -07:00
Lawrence Pit
1e1d30715e
Fix parsing xml input by ActionDispatch::ParamsParser
...
[#4437 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-06 20:34:47 -07:00
Ernie Miller
902861a43a
Fix unintuitive behavior with multiple order and group clauses
...
[#4545 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-06 16:00:39 -07:00
Carl Lerche
6d7f2790cd
Expand paths to app builders relative to the working directory
2010-05-06 12:02:54 +03:00
Ernie Miller
5be49884b5
Prevent calling regexp on symbol in Ruby 1.9 in association_proxy
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2010-05-05 18:54:07 +01:00
wycats
743d77f405
Update hidden namespace mechanism to work better with alternate choices and to support full namespaces (not just entire groups)
2010-05-05 10:12:33 +02:00
Xavier Noria
f2072a323c
adds Date#to_time refinement from previous commit to the CHANGELOG
2010-05-05 00:48:31 +02:00
Brian Lopez
bf2ee89659
add support for mysql2 adapter to dbconsole
...
[#4532 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-04 15:47:08 -07:00
Xavier Noria
53c1cd6cde
let Time.time_with_datetime_fallback handle properly years in the range 0..138
2010-05-05 00:35:06 +02:00
Mathieu Arnold
38da0ace77
Use primary key in conditions, not 'id' [ #4395 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2010-05-04 22:45:08 +01:00
Jatinder Singh
bce2c0ce37
Active Model JSON serializer now supports custom root option
...
[#4515 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-04 13:17:26 -07:00
Brian Lopez
7aad851c2e
Allow pre-casted values (other than nil) to pass through from calculations un-touched
...
[#4514 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-04 11:57:52 -07:00
Josiah Ivey
0dd3b4630f
image_tag should be audio_tag, and change typo 'image' to 'audio file'
2010-05-04 19:31:41 +02:00
mica eked
d5e3c49478
typo "<image />" -> "<img />", and typo 'follow' -> 'following'
2010-05-04 19:31:40 +02:00
logylaps
d38b4771f1
typo 'main.cs' -> 'main.css', and textile typo 'h6(:has_many-group)' -> 'h6(#has_many-group)', and typo. missing 'if'
2010-05-04 19:31:32 +02:00
Joe Hannon
c8d03fbe9b
grammatical error 'uses' -> 'use'
2010-05-04 19:24:40 +02:00
Mikel Lindsaar
058f7feafe
Cleaning up Action Mailer spelling with and without the space
2010-05-04 19:24:40 +02:00
Mikel Lindsaar
fb30feb48b
Adding more docs to ActionMailer
2010-05-04 19:24:40 +02:00
Pratik Naik
841c01fa0f
Use class_inheritable_accessor for connection_handler
2010-05-04 17:51:22 +01:00
Xavier Noria
6704d8c994
date/conversions needs time/calculations for (utc|local)_time
2010-05-03 23:11:09 +02:00
Xavier Noria
5d7d0c2fa3
BigDecimal#as_json does not really specify the F format, it delegates that to whatever BigDecimal#to_s default format is, do the same in its test
2010-05-03 22:11:33 +02:00
Xavier Noria
9e085a9f33
adds a comment explaining why BigDecimal#as_json returns a JSON string
2010-05-03 22:04:47 +02:00
Xavier Noria
34d5725167
fixes colon in previous YAML example
2010-05-03 15:25:28 +02:00
Norman Clarke
756f762cdb
Fix transliteration rule example in docs. [ #4526 state:resolved]
...
Signed-off-by: Xavier Noria <fxn@hashref.com >
2010-05-03 15:22:52 +02:00
David Chelimsky
b3dcbedc67
move assert_template tests to their own test case [ #4501 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-03 13:46:34 +02:00
David Chelimsky
849ab92942
Eliminate false positives when passing symbols to assert_template
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-03 13:46:12 +02:00
José Valim
36fc489aa3
Update I18n gem to 0.4.0.beta1 [ #4525 state:resolved].
2010-05-03 13:45:36 +02:00
Lawrence Pit
9bd91b00b8
Favor %{} in all code instead of (deprecated) {{}} as interpolation syntax for I18n
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-03 13:37:32 +02:00
José Valim
8ae9b05fa0
Make backtrace_cleaner work as expected. Prior to this patch, the Full Trace rarely showed the full trace. Also, increase performance considerably.
2010-05-03 12:59:48 +02:00
Xavier Noria
0e00f428a8
adds test coverage for Date.current vs Date.today in Date.(yesterday|tomorrow) implementation
2010-05-03 00:03:32 +02:00
David Chelimsky
8672a97e11
add NullResolver
...
[#4523 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-02 22:45:54 +02:00
David Chelimsky
a3044967ed
add tests for FixtureResolver
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-02 22:45:54 +02:00
David Chelimsky
91125f9927
move FixtureResolver to a file that is accessible outside Rails' own tests
...
[#4522 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-02 22:45:54 +02:00
José Valim
a76c7e68d5
Event should be aware if yielded block failed or not.
2010-05-02 22:45:54 +02:00
Justin George
731d4392e4
Change event namespace ordering to most-significant first [ #4504 state:resolved]
...
More work still needs to be done on some of these names
(render_template.action_view and render_template!.action_view particularly)
but this allows (for example) /^sql/ to subscribe to all
the various ORMs without further modification
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-02 22:45:54 +02:00
Justin George
109d3ee38d
Make notifications go off even when an error is raised, so that we capture the underlying performance data [ #4505 state:resolved]
...
This is important when trying to keep track of many layers of interrelated calls
i.e.:
ActiveRecord::Base.transaction do
MyModel.find(1) #ActiveRecord::NotFound
end # should capture the full time until the error propagation
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-02 22:45:53 +02:00