| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| | |
[#4990 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
| |
| |
| |
| |
| |
| | |
hardcoding "schema_migrations"
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
| | |
|
| |
| |
| |
| | |
Signed-off-by: Michael Koziarski <michael@koziarski.com>
|
| | |
|
|/ |
|
|\ |
|
| |
| |
| |
| |
| |
| | |
to that model and the associated attributes already exist. Tests included. [#2415 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
| |
| |
| |
| | |
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
| | |
|
| | |
|
| |
| |
| |
| | |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
| |
| |
| |
| |
| | |
state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| | |
|
| |
| |
| |
| |
| |
| | |
values_at. [#4976 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
| |
| |
| |
| |
| | |
added instead
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | | |
[#4219 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
original patch! [#4949 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |/
| |
| |
| |
| |
| | |
[#4972 state:committed]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
| |
| |
| | |
[#4841 state:committed]
|
| | |
|
| | |
|
| |\ |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
going through options :utc and then going back to :local
[#4950 state:committed]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |/
| |
| |
| | |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
| |
| |
| | |
frameworks like ActiveRecord and ActiveResource to log outsude Rails::Application [#4816 state:resolved]
|
| |
| |
| |
| |
| |
| | |
Comment added in #3164 is incorrect after reading http://dev.rubyonrails.org/ticket/7191.
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
destroyed on reset.
[#4938]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
| |
| |
| |
| | |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
| |
| |
| |
| |
| | |
[#4547 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
| |
| |
| |
| |
| | |
Cloning an active record object should be shallow in that it should copy attributes but not associations. This was no longer true as a result of #3164.
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
| |
| |
| |
| |
| | |
[#4803 state:resolved]
Signed-off-by: Michael Koziarski <michael@koziarski.com>
|
| |
| |
| |
| | |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
| |
| |
| |
| |
| | |
test for Arel::Relation as right hand value. [#4917 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
hash and make various Validators pass their (filtered) options.
This makes it possible to pass additional options through Validators to message generation. E.g. plugin authors want to add validates_presence_of :foo, :format => "some format".
Also, cleanup the :default vs :message options confusion in ActiveModel validation message generation.
Also, deprecate ActiveModel::Errors#add_on_blank(attributes, custom_message) in favor of ActiveModel::Errors#add_on_blank(attributes, options).
Also, refactoring of ActiveModel and ActiveRecord Validation tests. Test are a lot more DRY now. Better test coverage as well now.
The first four points were reapplied from an older patch of Sven Fuchs which didn't apply cleanly anymore and was not complete yet.
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
| |
| |
| |
| |
| | |
state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
| |
| |
| | |
This reverts commit 41ed4db560bf50e0ccb99915a03c37d39bff135b.
|
| | |
|