aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/reply.rb
Commit message (Collapse)AuthorAgeFilesLines
* Remove mass assignment security from ActiveRecordGuillermo Iguaran2012-09-161-2/+0
|
* Deprecate eager-evaluated scopes.Jon Leighton2012-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't use this: scope :red, where(color: 'red') default_scope where(color: 'red') Use this: scope :red, -> { where(color: 'red') } default_scope { where(color: 'red') } The former has numerous issues. It is a common newbie gotcha to do the following: scope :recent, where(published_at: Time.now - 2.weeks) Or a more subtle variant: scope :recent, -> { where(published_at: Time.now - 2.weeks) } scope :recent_red, recent.where(color: 'red') Eager scopes are also very complex to implement within Active Record, and there are still bugs. For example, the following does not do what you expect: scope :remove_conditions, except(:where) where(...).remove_conditions # => still has conditions
* DRY up the code which instantiates the association proxyJon Leighton2011-01-111-0/+7
|
* Fix failing test.José Valim2010-05-211-3/+3
|
* Make sure valid? preceives the context as in ActiveModel API (ht: Carlos ↵José Valim2010-05-101-0/+5
| | | | Antonio)
* Rename named_scope to scopePratik Naik2010-01-181-1/+1
|
* Simplify repair_validations on AR and make it work with new callbacks.José Valim2010-01-011-2/+4
|
* Changed ActiveRecord to use new callbacks and speed up observers by only ↵José Valim2009-09-081-4/+4
| | | | | | notifying events that are actually being consumed. Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Add primary_key option to belongs_to associationSzymon Nowak2009-07-151-1/+2
| | | | | | [#765 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Deprecate Model#validate/validate_on_create/validate_on_update. Use ↵Pratik Naik2009-03-211-3/+7
| | | | Model.validate :method and likewise
* Move all the Active Record validations to Active ModelPratik Naik2009-03-191-5/+5
|
* Ensure belongs_to association with a counter cache in name spaced model ↵Adam Cooper2009-03-061-0/+6
| | | | | | works [#1678 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fix file permissionsTarmo Tänav2008-07-311-0/+0
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Change tests against all scope to base scope as all is now used as a finder ↵David Heinemeier Hansson2008-04-301-0/+2
| | | | alias
* Fix pathsJeremy Kemper2008-01-181-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* move assets and modelsJeremy Kemper2008-01-181-0/+37
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8657 5ecf4fe2-1ee6-0310-87b1-e25e094e27de