Jon Leighton
72a4893452
Merge pull request #451 from baroquebobcat/fixing_last_for_issue_371
2011-05-08 23:43:34 +01:00
Nick Howard
92c10760d7
Fix for #371
...
if a query contains a limit or an offset, ActiveRecord::FinderMethods#find_last had inconsistent behavior.
If the records were loaded, it returned the last record in the cached list.
If they were not, it reversed the order of the query and changed the limit to one.
If the earlier limit was less than the total matching the query in the db,
it would return a different record than if the records had been cached.
This commit changes find_last so that it loads the records when getting the
last record on a query containing a limit or an offset, which makes the behavior consistent.
2011-05-08 23:42:53 +01:00
Jon Leighton
8f10ccd311
Ensure that ORDER BY clauses from default scopes are not included in calculation queries. Fixes #406 .
2011-05-08 23:31:16 +01:00
José Valim
b3791da031
Merge pull request #457 from vijaydev/master
...
Adds examples in code for ordinalizing negative numbers
2011-05-08 11:21:47 -07:00
Vijay Dev
91c18554f6
adds code examples for negative ordinalize
2011-05-08 23:48:15 +05:30
Jon Leighton
a8daea4b85
Merge pull request #332 from cmeiklejohn/bug6230_optimistic_locking_double_quoted
2011-05-08 18:53:12 +01:00
Christopher Meiklejohn
4fbd8adf48
Don't quote ID's as Arel will quote them -- follow same conventions as the delete method.
2011-05-08 18:37:28 +01:00
Aaron Patterson
a45f300e5f
Merge pull request #445 from prakashmurthy/lighthouse_6334
...
Fix for Lighthouse ticket # 6334 : to_xml should render valid xml or raise an error all the time
2011-05-08 10:13:39 -07:00
José Valim
f69be6ae8f
Merge pull request #455 from joshk/mass_assignment_roles
...
Renamed mass-assignment scopes to roles
2011-05-08 08:19:38 -07:00
Josh Kalderimis
b2451f4a7f
renamed mass-assignment scopes to roles, updated code, tests, docs and security guide
2011-05-08 16:43:29 +02:00
José Valim
9727dd1e38
Merge pull request #388 from smartinez87/remove_method
...
Better use #remove_possible_method here
2011-05-08 07:42:02 -07:00
Sebastian Martinez
b94d94a1ae
Better use #remove_possible_method here
2011-05-08 11:31:56 -03:00
prakashmurthy
6b31fd8070
Lighthouse ticket # 6334; added tests to verify that spaces in key are dasherized.
2011-05-08 06:13:18 -06:00
José Valim
80bf68aa1b
prepend the assets route instead of appending, closes #436
2011-05-08 12:59:04 +02:00
José Valim
c2b55c4fbf
Merge pull request #454 from dlee/nested_indifferent_access
...
indifferent access should recurse Hash subclasses
2011-05-08 03:44:27 -07:00
David Lee
099eb2b3fd
indifferent access should recurse Hash subclasses
...
This commit makes Hash subclasses convert to HWIA by default for nested
objects of subclasses of Hash, but allows certain subclasses to prevent nested
conversion by introducing Hash#nested_under_indifferent_access that subclasses
can overwrite.
ActiveSupport::OrderedHash is one such subclass that overwrites
+nested_under_indifferent_access+, since implicitly converting it to HWIA would
remove the ordering of keys and values in Ruby 1.8.
This change is necessary because commit ce9456e broke nested indifferent access
conversion for all subclasses of Hash.
2011-05-08 03:40:51 -07:00
José Valim
e5a0122419
Revert to use === only here because of perf. :(
2011-05-08 12:40:15 +02:00
José Valim
843cab6f98
Merge pull request #420 from burke/master
...
Accept single prefix in ActionView::MissingTemplate#initialize
2011-05-08 03:35:14 -07:00
José Valim
30db3a82f6
Merge pull request #430 from dlee/methodoverride
...
Logs should show overridden method; Issue 426
2011-05-08 03:33:22 -07:00
José Valim
ad129639c7
Fix failing xml mini test.
2011-05-08 12:25:02 +02:00
José Valim
67c3469e6f
Merge pull request #452 from jrom/runner-r-alias
...
Add alias `r` for rails runner
2011-05-08 01:13:08 -07:00
Jordi Romero
bfff5eac77
Add alias r for rails runner
2011-05-07 20:12:34 -07:00
Burke Libbey
06671c37de
Added activesupport requires for Array.wrap in previously modified files
2011-05-07 18:30:50 -05:00
Santiago Pastorino
70f9558d0e
Merge pull request #449 from msgehard/rename_duplicate_test_methods
...
Rename duplicate tests
2011-05-07 16:14:37 -07:00
Mike Gehard
0bc91a4cf7
Rename duplicate tests. There is now one failing test that was failing before the rename but was never getting run.
2011-05-07 17:02:42 -06:00
Aaron Patterson
820b6f3da0
Merge pull request #442 from jasonnoble/namespace_fixtures
...
Namespace Fixtures in ActiveRecord
2011-05-07 15:33:51 -07:00
Jason Noble
e5c18ff2cc
Added deprecation warning for Fixture(s) (Use ActiveRecord::Fixture(s))
2011-05-07 16:15:09 -06:00
José Valim
0ef978d1d2
Revert "Merge pull request #275 from pk-amooma/master"
...
Several AP tests fail after this change.
This reverts commit aaf01cd537 , reversing
changes made to 9cc18c52fa .
2011-05-07 23:45:15 +02:00
José Valim
0a1ba4eab0
Always expand */*
2011-05-07 23:43:44 +02:00
mathieuravaux
fadd1fa3d3
Fixes ticket #6379 . Improved the handling of Accept headers containing */*.
...
`lookup_context#formats=` being too restrictive, "Accept: text/javascript, */*"
resulted in [:js, "*/*"] formats instead of [:js, :html].
Signed-off-by: José Valim <jose.valim@gmail.com >
2011-05-07 23:35:52 +02:00
José Valim
803548c46b
xml_mini_test.rb now runs.
2011-05-07 22:45:06 +02:00
Jason Noble
7db2ef47a1
Namespace Fixtures in ActiveRecord
...
[Fixes #439 ]
2011-05-07 14:20:51 -06:00
Aaron Patterson
3a82ff9555
Merge pull request #438 from jasonmichaelroth/ordinalize_negative_numbers
...
ordinalize negative numbers patch
2011-05-07 12:31:20 -07:00
Jason
3880ab0d7c
ordinalize negative numbers patch
...
Applied patch by Amir Manji
https://github.com/rails/rails/issues/437#issuecomment-1116045
Signed-off-by: Jason <jasonmichaelroth@gmail.com >
2011-05-07 13:21:00 -06:00
Xavier Noria
7ec3f33e3a
Merge pull request #435 from vijaydev/master
...
Update README template to include info about app/assets
2011-05-07 09:36:46 -07:00
Vijay Dev
9d6f28d234
update readme to reflect app/assets
2011-05-07 21:40:34 +05:30
José Valim
45aec460d4
Merge pull request #434 from arunagw/changelog_doc
...
Updated changelog for jdbc* adapters template.
2011-05-07 09:01:36 -07:00
Arun Agrawal
4addc99d19
Updated change log for jdbc* adapters template.
2011-05-07 21:24:21 +05:30
José Valim
ba23bf43f2
Class.new.name returns an empty string on 1.8
2011-05-07 17:46:44 +02:00
José Valim
5d6c8d5e9d
Revert "Revert the merge because tests did not pass."
...
This reverts commit 886818d2ba .
2011-05-07 17:33:40 +02:00
José Valim
00a1152fa7
Update CHANGELOG.
2011-05-07 15:32:11 +02:00
José Valim
7d7a353f77
Merge pull request #343 from asanghi/ampm
...
Allow AM/PM format in datetime selectors
2011-05-07 06:31:18 -07:00
José Valim
f77cd7c7b6
Merge pull request #286 from jasoncodes/marshal_subsec
...
Fix marshal round-tripping of fractional seconds (Time#subsec).
2011-05-07 04:39:50 -07:00
José Valim
c444b0f67b
ADdd missing requires (thanks to @arunagw)
2011-05-07 13:35:21 +02:00
José Valim
0e886fe10e
Merge pull request #280 from jballanc/frozen-string-strip-tags
...
Stripping tags from a frozen string
2011-05-07 03:44:19 -07:00
José Valim
aaf01cd537
Merge pull request #275 from pk-amooma/master
...
properly escape "'" to "'" for XML
2011-05-07 03:41:26 -07:00
José Valim
9cc18c52fa
Merge pull request #263 from CvX/master
...
Corrected dbconsole usage message
2011-05-07 03:34:28 -07:00
José Valim
b011a7a938
Merge remote branch 'rolftimmermans/desc_tracker'
2011-05-07 12:26:45 +02:00
José Valim
a761d77902
Merge pull request #248 from bigfix/enumerable_as_json
...
Enumerable should pass encoding options to children in #as_json/#to_json
2011-05-07 03:19:56 -07:00
David Lee
17a91a6ef9
Logs should show overridden method; Issue 426
2011-05-07 03:04:26 -07:00