Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | stop calling to_sym when building arel nodes [CVE-2013-1854] | Aaron Patterson | 2013-03-15 | 1 | -5/+5 |
| | |||||
* | Make it the responsibility of the connection to hold onto an ARel visitor ↵ | Jon Leighton | 2011-08-08 | 1 | -4/+4 |
| | | | | for generating SQL. This improves the code architecture generally, and solves some problems with marshalling. Adapter authors please take note: you now need to define an Adapter.visitor_for method, but it degrades gracefully with a deprecation warning for now. | ||||
* | please use ruby -I lib:test path/to/test.rb, or export RUBY_OPT | Aaron Patterson | 2011-06-06 | 1 | -1/+1 |
| | |||||
* | Refactor Active Record test connection setup. Please see the ↵ | Jon Leighton | 2011-06-04 | 1 | -1/+1 |
| | | | | RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases. | ||||
* | minor cleaning with new api method | Vishnu Atrai | 2011-05-11 | 1 | -11/+11 |
| | |||||
* | Deprecated support for passing hashes and relations to default_scope, in ↵ | Jon Leighton | 2011-04-12 | 1 | -6/+6 |
| | | | | favour of defining a 'default_scope' class method in the model. See the CHANGELOG for more details. | ||||
* | Remove Relation#& alias for Relation#merge | Ernie Miller | 2011-02-12 | 1 | -1/+1 |
| | |||||
* | stop calling deprecated apis | Aaron Patterson | 2010-12-26 | 1 | -4/+4 |
| | |||||
* | adding tests for #5234 and #5184. Tests were from Akira Matsuda. Thanks Akira! | Aaron Patterson | 2010-10-30 | 1 | -0/+6 |
| | |||||
* | Set attributes properly for model built from association with conditions ↵ | Marcelo Giorgi | 2010-09-28 | 1 | -1/+1 |
| | | | | | | [#5562 state:resolved] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | specific number of spaces should not be enforced | Aaron Patterson | 2010-09-10 | 1 | -1/+1 |
| | |||||
* | code gardening: we have assert_(nil|blank|present), more concise, with ↵ | Xavier Noria | 2010-08-17 | 1 | -1/+1 |
| | | | | better default failure messages - let's use them | ||||
* | do not rely on arel class structure | Aaron Patterson | 2010-08-06 | 1 | -0/+7 |
| | |||||
* | removing unused models from tests | Subba Rao Pasupuleti | 2010-07-21 | 1 | -2/+1 |
| | | | | | | [#5153 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Add scoping and unscoped as the syntax to replace the old with_scope and ↵ | José Valim | 2010-06-29 | 1 | -202/+5 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with_exclusive_scope. A few examples: * with_scope now should be scoping: Before: Comment.with_scope(:find => { :conditions => { :post_id => 1 } }) do Comment.first #=> SELECT * FROM comments WHERE post_id = 1 end After: Comment.where(:post_id => 1).scoping do Comment.first #=> SELECT * FROM comments WHERE post_id = 1 end * with_exclusive_scope now should be unscoped: class Post < ActiveRecord::Base default_scope :published => true end Post.all #=> SELECT * FROM posts WHERE published = true Before: Post.with_exclusive_scope do Post.all #=> SELECT * FROM posts end After: Post.unscoped do Post.all #=> SELECT * FROM posts end Notice you can also use unscoped without a block and it will return an anonymous scope with default_scope values: Post.unscoped.all #=> SELECT * FROM posts | ||||
* | with_exclusive_scope does not work properly if ARel is passed. It does work ↵ | Neeraj Singh | 2010-06-29 | 1 | -0/+6 |
| | | | | | | | | nicely if hash is passed. Blow up if user is attempting it pass ARel to with_exclusive_scope. [#3838 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Support for multiple selects added | Neeraj Singh and Santiago Pastorino | 2010-06-25 | 1 | -3/+5 |
| | | | | [#4841 state:committed] | ||||
* | 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> | ||||
* | Remove Model.clear_default_scope | Pratik Naik | 2010-05-18 | 1 | -12/+0 |
| | |||||
* | Modified default_scope to merge with any pre-existing default_scope | David Chelimsky + Brian Tatnall | 2010-05-15 | 1 | -2/+29 |
| | | | | | | | | | | | | and added AR::Base::clear_default_scope - clear_default_scope provides users who rely on the old behaviour of each call to default_scope overwriting any previous default scopes an opportunity to maintain that behaviour. [#4583 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | cleaning up a bunch of parse time warnings in AR [#4186 state:resolved] | Aaron Patterson | 2010-03-15 | 1 | -1/+1 |
| | | | | Signed-off-by: wycats <wycats@gmail.com> | ||||
* | Fix a bug where default_scope was overriding attributes given on model ↵ | Henry Hsu | 2010-02-26 | 1 | -0/+10 |
| | | | | | | initialization [#3218 status:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Make default_scope work with Relations | Pratik Naik | 2010-01-23 | 1 | -1/+7 |
| | |||||
* | Remove Relation#where_clause | Pratik Naik | 2010-01-19 | 1 | -4/+4 |
| | |||||
* | Get rid of Relation#order_clauses | Pratik Naik | 2010-01-18 | 1 | -3/+3 |
| | |||||
* | Make merging of order values consistent | Pratik Naik | 2010-01-17 | 1 | -4/+4 |
| | |||||
* | Make scopes use relations under the hood | Pratik Naik | 2010-01-16 | 1 | -33/+32 |
| | |||||
* | Don't publicize with_scope for tests since it may shadow public misuse | Jeremy Kemper | 2009-12-28 | 1 | -87/+87 |
| | |||||
* | Moved relation's test to relation_test. | Emilio Tagua | 2009-10-05 | 1 | -2/+2 |
| | |||||
* | Merge commit 'rails/master' | Emilio Tagua | 2009-08-08 | 1 | -0/+1 |
|\ | | | | | | | | | | | Conflicts: activerecord/test/cases/adapter_test.rb activerecord/test/cases/method_scoping_test.rb | ||||
| * | Oracle generates different ORDER BY fragment | Raimonds Simanovskis | 2009-08-06 | 1 | -1/+2 |
| | | |||||
* | | Introduced ActiveRecord::Relation, a layer between an ARel relation and an ↵ | Emilio Tagua | 2009-07-21 | 1 | -2/+2 |
| | | | | | | | | AR relation | ||||
* | | Merge commit 'rails/master' | Emilio Tagua | 2009-05-18 | 1 | -0/+10 |
|\| | | | | | | | | | | | | | | | | | Conflicts: activerecord/lib/active_record.rb Updated: Arel submodule | ||||
| * | Make sure default_scope#create checks for options[:conditions] [#2181 ↵ | Pratik Naik | 2009-05-18 | 1 | -0/+10 |
| | | | | | | | | state:resolved] [James Le Cuirot] | ||||
* | | Merge commit 'rails/master' | Emilio Tagua | 2009-05-02 | 1 | -3/+3 |
|\| | |||||
| * | Default scope :order should be overridden by named scopes. | Alexander Podgorbunsky | 2009-05-01 | 1 | -3/+3 |
| | | | | | | | | | | | | [#2346 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | | construct_finder_sql now use Arel | Emilio Tagua | 2009-04-24 | 1 | -1/+1 |
|/ | |||||
* | Fix models load order to be able to run unit tests. | Emilio Tagua | 2009-04-23 | 1 | -1/+1 |
| | | | | | | [#2550 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Don't duplicate :order from scope and options, it makes mysql do extra work | Jeremy Kemper | 2009-03-10 | 1 | -2/+4 |
| | |||||
* | Ensure nested with_scope merges conditions inside out [#2193 state:resolved] | Manfred Stienstra | 2009-03-10 | 1 | -5/+33 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | update the default scope test to take the model's default scope into account | rick | 2009-02-25 | 1 | -1/+1 |
| | |||||
* | Ensure whitespaces are stripped when merging string joins. [#1297 ↵ | Filip H.F. "FiXato" Slagter | 2009-01-28 | 1 | -0/+10 |
| | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Ensure Model#last doesn't affects order for another finders inside the same ↵ | Daniel Luz | 2008-12-21 | 1 | -0/+18 |
| | | | | | | scope [#1499 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Fix default_scope to work in combination with named scopes | Tom Stuart | 2008-11-17 | 1 | -3/+9 |
| | | | | Signed-off-by: David Heinemeier Hansson <david@loudthinking.com> | ||||
* | Added default_scope to Base [#1381 state:committed] (Paweł Kondzior) | Pratik Naik | 2008-11-16 | 1 | -0/+61 |
| | |||||
* | Revert "Added default_scope to Base [#1381 state:committed] (Paweł ↵ | David Heinemeier Hansson | 2008-11-16 | 1 | -38/+0 |
| | | | | | | Kondzior)" -- won't gel with threads. This reverts commit ff594b2bc94ff2a942fe6ca05672387722dee686. | ||||
* | Added default_scope to Base [#1381 state:committed] (Paweł Kondzior) | David Heinemeier Hansson | 2008-11-16 | 1 | -0/+38 |
| | |||||
* | Allowed passing arrays-of-strings to :join everywhere. Merge duplicate join ↵ | Pivotal Labs | 2008-09-24 | 1 | -0/+30 |
| | | | | | | | strings to avoid table aliasing problems. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1077 state:committed] | ||||
* | Merge scoped :joins together instead of overwriting them. May expose scoping ↵ | Andrew White | 2008-08-28 | 1 | -2/+79 |
| | | | | | | | | bugs in your code! [#501 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Added missing fixtures for tests which fail to run independently if run ↵ | Tarmo Tänav | 2008-08-04 | 1 | -1/+1 |
| | | | | | | after schema reset Signed-off-by: Michael Koziarski <michael@koziarski.com> |