Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | use persisted? instead of new_record? wherever possible | David Chelimsky | 2010-11-09 | 1 | -21/+21 |
| | | | | | | | | | | | - persisted? is the API defined in ActiveModel - makes it easier for extension libraries to conform to ActiveModel APIs without concern for whether the extended object is specifically ActiveRecord [#5927 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | Add some tests for functionality in JoinAssociation which already exists but ↵ | Jon Leighton | 2010-10-13 | 1 | -1/+1 |
| | | | | was previously untested | ||||
* | fisting test organization | Aaron Patterson | 2010-09-29 | 1 | -51/+0 |
| | |||||
* | query value is converted to_s instead of to_yaml | RainerBlessing | 2010-08-03 | 1 | -0/+8 |
| | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | removing unused models from tests | Subba Rao Pasupuleti | 2010-07-21 | 1 | -1/+0 |
| | | | | | | [#5153 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Final iteration of use better testing methods | Neeraj Singh | 2010-05-19 | 1 | -1/+1 |
| | | | | | | [#4652 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Make use of assert_equal to test equallity between object assert expects and ↵ | Santiago Pastorino | 2010-05-16 | 1 | -2/+2 |
| | | | | | | | | object and a message of error [#4611 state:committed] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Make find_or_create and find_or_initialize work mixing explicit parameters ↵ | Santiago Pastorino | 2010-05-07 | 1 | -1/+17 |
| | | | | | | and a hash [#4457 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Remove quoted_string_prefix entirely since PostgreSQL was the only database ↵ | Jeremy Kemper | 2010-04-24 | 1 | -2/+2 |
| | | | | adapter relying on it. | ||||
* | Don't depend on order of elements in Set | Evan Phoenix | 2010-03-22 | 1 | -5/+16 |
| | |||||
* | Don't publicize with_scope for tests since it may shadow public misuse | Jeremy Kemper | 2009-12-28 | 1 | -2/+2 |
| | |||||
* | Add Model.from and association_collection#from finder methods | Pratik Naik | 2009-12-28 | 1 | -1/+1 |
| | |||||
* | Make Model.find_or_create_by_* and find_or_initialize_by_* use relations and ↵ | Pratik Naik | 2009-12-27 | 1 | -7/+0 |
| | | | | remove method caching | ||||
* | Make Model.find_by_* and Model.find_all_by_* use relations and remove ↵ | Pratik Naik | 2009-12-27 | 1 | -46/+0 |
| | | | | dynamic method caching | ||||
* | Replace Model.first(options) with new finder methods inside tests | Pratik Naik | 2009-12-27 | 1 | -2/+2 |
| | |||||
* | Ensure Model.scoped adds type conditions for STI models | Pratik Naik | 2009-12-27 | 1 | -1/+1 |
| | |||||
* | Merge commit 'rails/master' | Emilio Tagua | 2009-08-08 | 1 | -47/+12 |
|\ | | | | | | | | | | | Conflicts: activerecord/test/cases/adapter_test.rb activerecord/test/cases/method_scoping_test.rb | ||||
| * | Tidy up the AR tests, removing duplicates and making tests clearer / more ↵ | Josh Sharpe | 2009-08-08 | 1 | -46/+11 |
| | | | | | | | | | | | | | | | | focussed. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#2774 state:committed] | ||||
| * | Some databases (e.g. Oracle) does not allow "AS" between table name and ↵ | Raimonds Simanovskis | 2009-08-06 | 1 | -1/+1 |
| | | | | | | | | table alias name, for others it is optional | ||||
* | | Merge commit 'rails/master' | Emilio Tagua | 2009-08-05 | 1 | -1/+51 |
|\| | |||||
| * | Extract generic attribute method generation to AMo | Joshua Peek | 2009-08-04 | 1 | -1/+1 |
| | | |||||
| * | quoted_date converts time-like objects to ↵ | Geoff Buesing | 2009-08-03 | 1 | -0/+50 |
| | | | | | | | | ActiveRecord::Base.default_timezone before serialization. This allows you to use Time.now in find conditions and have it correctly be serialized as the current time in UTC when default_timezone == :utc [#2946 state:resolved] | ||||
* | | Introduced ActiveRecord::Relation, a layer between an ARel relation and an ↵ | Emilio Tagua | 2009-07-21 | 1 | -2/+2 |
|/ | | | | AR relation | ||||
* | Revert "Revert "Generate proper :counter_sql from :finder_sql when there is ↵ | Pratik Naik | 2009-07-01 | 1 | -2/+2 |
| | | | | | | | | | a newline character immediately following 'SELECT' [#2118 state:resolved]"" This reverts commit 80f1f863cd0f9cba89079511282de5710a2e1832. The feature doesn't work on Postgres, so don't test it on Postgres. Also, Postgres compatibility is irrelevant to the ticket/patch in question. | ||||
* | Revert "Generate proper :counter_sql from :finder_sql when there is a ↵ | Yehuda Katz + Carl Lerche | 2009-06-22 | 1 | -2/+2 |
| | | | | | | | | newline character immediately following 'SELECT' [#2118 state:resolved]" This reverts commit 4851ca9e13a4317342df02ae25b1929340523f7a. The tests do not pass for postgresql. | ||||
* | Generate proper :counter_sql from :finder_sql when there is a newline ↵ | Patrick Joyce | 2009-06-21 | 1 | -2/+2 |
| | | | | | | character immediately following 'SELECT' [#2118 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Add missing model and fixtures to finder_test [#2671 state:resolved] | Emilio Tagua | 2009-05-18 | 1 | -2/+2 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Changed ActiveRecord::Base#exists? to invoke find_initial so that it is ↵ | Peter Marklund | 2009-05-14 | 1 | -0/+6 |
| | | | | | | | compatible with, and doesn't lose, :include scopes (references to eager loaded tables) Signed-off-by: Michael Koziarski <michael@koziarski.com> [#2543 state:committed] | ||||
* | Cherry-pick core extensions | Jeremy Kemper | 2009-05-13 | 1 | -2/+3 |
| | |||||
* | Fix models load order to be able to run unit tests. | Emilio Tagua | 2009-04-23 | 1 | -4/+4 |
| | | | | | | [#2550 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Ruby 1.9 compat: rename deprecated assert_raises to assert_raise. | Jeremy Kemper | 2009-03-08 | 1 | -32/+32 |
| | | | | [#1617 state:resolved] | ||||
* | Allow :having conditions to be sanitized like regular :condition. [#2158 ↵ | Will Bryant | 2009-03-06 | 1 | -0/+7 |
| | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Ensure supplie :from has precedence over scoped :from [#1370 state:resolved] | Pratik Naik | 2009-03-06 | 1 | -0/+8 |
| | |||||
* | support end-exclusive ... Ranges in SQL hash condition sanitization properly | Will Bryant | 2009-02-06 | 1 | -0/+6 |
| | | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1865 state:committed] | ||||
* | Add ActiveRecord::Base.exists? with no args [#1817 state:committed] | Scott Taylor | 2009-02-05 | 1 | -1/+10 |
| | | | | Signed-off-by: David Heinemeier Hansson <david@loudthinking.com> | ||||
* | Bump mocha requirement for Ruby 1.9 compat. Remove uses_mocha. | Jeremy Kemper | 2009-02-03 | 1 | -12/+10 |
| | |||||
* | Add :having option to find, to use in combination with grouped finds. Also ↵ | miloops | 2008-12-01 | 1 | -0/+7 |
| | | | | | | | added to has_many and has_and_belongs_to_many associations. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1028 state:committed] | ||||
* | Fixed issue where block is not called on the very first invocation of a ↵ | Ken Miller | 2008-10-24 | 1 | -0/+11 |
| | | | | | | find_or_create_by_ automatic finder. [#1224 state:committed] | ||||
* | Dynamic finders should use the ActiveRecord::Base::find method instead of ↵ | Eloy Duran | 2008-10-03 | 1 | -5/+22 |
| | | | | | | | | | | | | ::find_initial, :find_last, and ::find_all. This is so when people override ActiveRecord::Base::find, the new ::find method will also be invoked by the dynamic finders. Associations for instance do go through ::find, so this makes it more consistent. Also removed the unnecessary deprecation silence blocks. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1162 state:committed] | ||||
* | Allowed passing arrays-of-strings to :join everywhere. Merge duplicate join ↵ | Pivotal Labs | 2008-09-24 | 1 | -0/+11 |
| | | | | | | | strings to avoid table aliasing problems. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1077 state:committed] | ||||
* | Change all calls to String#chars to String#mb_chars. | Manfred Stienstra | 2008-09-21 | 1 | -2/+2 |
| | |||||
* | Use select and change test so new tests can work on postgres. | miloops | 2008-09-12 | 1 | -2/+2 |
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> | ||||
* | Improve test coverage when using the group option in find, has_many or ↵ | miloops | 2008-09-11 | 1 | -0/+6 |
| | | | | | | has_and_belongs_to_many. Signed-off-by: Michael Koziarski <michael@koziarski.com> | ||||
* | Fix ActiveRecord::Base.quote_bound_value for ActiveSupper::Multibyte::Chars ↵ | Manfred Stienstra | 2008-09-11 | 1 | -2/+10 |
| | | | | | | | | | | values. - Adds String#acts_like_string? - Adds Chars#acts_like_string? Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1029 state:committed] | ||||
* | Fixed test_find_last_by_one_attribute_caches_dynamic_finder for postgresql 8.3 | Tarmo Tänav | 2008-09-10 | 1 | -1/+1 |
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> | ||||
* | Added find_last_by dynamic finder [status:committed #762] | miloops | 2008-09-09 | 1 | -4/+36 |
| | | | | Signed-off-by: David Heinemeier Hansson <david@loudthinking.com> | ||||
* | add dynamic finder bang version to raise RecordNotFound | Josh Susser | 2008-08-25 | 1 | -0/+14 |
| | | | | | | [#905 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | refactor dynamic finder name matching into its own class | Josh Susser | 2008-08-25 | 1 | -0/+42 |
| | | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Allow conditions on multiple tables to be specified using hash. | Pratik Naik | 2008-06-28 | 1 | -0/+17 |
| | | | | | | | | | Examples: User.all :joins => :items, :conditions => { :age => 10, :items => { :color => 'black' } } Item.first :conditions => { :items => { :color => 'red' } } Note : Hash key in :conditions is referring to the actual table name or the alias defined in query. | ||||
* | Named bind variables can now be used with postgresql-style typecasts | Tarmo Tänav | 2008-06-22 | 1 | -0/+7 |
| | | | | | For example :conditions => ['stringcol::integer = :var', { :var => 10 }] will no longer raise an exception about ':integer' having a missing value. |