- 06 9月, 2011 1 次提交
-
-
由 Damien Mathieu 提交于
-
- 18 7月, 2011 2 次提交
-
-
由 Prem Sichanugrist 提交于
-
由 Prem Sichanugrist 提交于
The previous behavior was unintentional, and some people was relying on it. Now the dynamic finder will always expecting the number of arguments to be equal or greater (so you can still pass the options to it.) So if you were doing this and expecting the second argument to be nil: User.find_by_username_and_group("sikachu") You'll now get `ArgumentError: wrong number of arguments (1 for 2).` You'll then have to do this: User.find_by_username_and_group("sikachu", nil)
-
- 07 6月, 2011 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 05 6月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Refactor Active Record test connection setup. Please see the 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.
-
- 03 6月, 2011 1 次提交
-
-
由 Arun Agrawal 提交于
-
- 11 5月, 2011 1 次提交
-
-
由 Michael Ebens 提交于
-
- 18 4月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Revert "Deprecate defining scopes with a callable (lambda, proc, etc) via the scope class method. Just define a class method yourself instead." This reverts commit f0e198bf. Conflicts: activerecord/test/models/post.rb
-
- 13 4月, 2011 3 次提交
-
-
由 Jon Leighton 提交于
Deprecate defining scopes with a callable (lambda, proc, etc) via the scope class method. Just define a class method yourself instead.
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
Removing the scope-caching which happens on association proxies, because the query is already cached by the query cacher. For formalised proof see http://www.youtube.com/watch?v=wDefXLb-FDs
-
- 30 3月, 2011 1 次提交
-
-
由 Andrew White 提交于
-
- 25 2月, 2011 1 次提交
-
-
由 Eric Allam 提交于
-
- 18 2月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Split AssociationProxy into an Association class (and subclasses) which manages the association, and a CollectionProxy class which is *only* a proxy. Singular associations no longer have a proxy. See CHANGELOG for more.
-
- 16 12月, 2010 1 次提交
-
-
由 Pavel Gorbokon 提交于
* rename method names (actually in tests) * rename instance variable @_named_scopes_cache to @_scopes_cache * rename references in doc comments * don't touch CHANGELOG :)
-
- 16 11月, 2010 1 次提交
-
-
由 Santiago Pastorino 提交于
[#5978 state:committed]
-
- 20 10月, 2010 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 06 9月, 2010 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 17 8月, 2010 1 次提交
-
-
由 Xavier Noria 提交于
code gardening: we have assert_(nil|blank|present), more concise, with better default failure messages - let's use them
-
- 03 8月, 2010 1 次提交
-
-
由 Neeraj Singh 提交于
method_missing is not hit next time. Adding a test for this scenario. Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 21 7月, 2010 1 次提交
-
-
由 Neeraj Singh 提交于
Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 30 6月, 2010 1 次提交
-
-
由 José Valim 提交于
-
- 29 6月, 2010 1 次提交
-
-
由 José Valim 提交于
Add scoping and unscoped as the syntax to replace the old with_scope and 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
-
- 05 6月, 2010 1 次提交
-
-
由 Xavier Noria 提交于
removes Array#random_element and backports Array#sample from Ruby 1.9, thanks to Marc-Andre Lafortune
-
- 04 6月, 2010 1 次提交
-
-
由 Pratik Naik 提交于
-
- 17 5月, 2010 1 次提交
-
-
由 Santiago Pastorino 提交于
Signed-off-by: NXavier Noria <fxn@hashref.com>
-
- 15 5月, 2010 1 次提交
-
-
由 Neeraj Singh 提交于
[#4507 state:resolved] Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 07 4月, 2010 1 次提交
-
-
由 Pratik Naik 提交于
-
- 06 4月, 2010 1 次提交
-
-
由 Pratik Naik 提交于
-
- 30 3月, 2010 1 次提交
-
-
由 Emilio Tagua 提交于
Named scopes shouldn't test equality using to_a if it's not an Array, this was causing records to be loaded before they were needed. Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 29 3月, 2010 1 次提交
-
-
由 Matthew Rudy Jacobs 提交于
This was motivated by the fact that :open is defined on all classes as such the named_scope "open" can never be used, without hacking ActiveRecord with an "undef_method" [#4083 state:resolved] Signed-off-by: Nwycats <wycats@gmail.com>
-
- 16 3月, 2010 1 次提交
-
-
由 Aaron Patterson 提交于
Signed-off-by: Nwycats <wycats@gmail.com>
-
- 22 1月, 2010 1 次提交
-
-
由 Pratik Naik 提交于
-
- 20 1月, 2010 1 次提交
-
-
由 Pratik Naik 提交于
-
- 18 1月, 2010 4 次提交
-
-
由 Pratik Naik 提交于
-
由 Pratik Naik 提交于
-
由 Pratik Naik 提交于
-
由 Pratik Naik 提交于
-
- 27 12月, 2009 1 次提交
-
-
由 Pratik Naik 提交于
-
- 10 8月, 2009 1 次提交
-
-
由 Tristan Dunn 提交于
-