aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/organization.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use frozen-string-literal in ActiveRecordKir Shatrov2017-07-191-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* modernizes hash syntax in activerecordXavier Noria2016-08-061-6/+6
|
* applies new string literal convention in activerecord/testXavier Noria2016-08-061-1/+1
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Add setting of FK for throgh associations while buildingIvan Antropov2014-05-251-0/+2
|
* 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
* Fix naughty trailing whitespaceJon Leighton2010-10-311-1/+1
|
* Support the :primary_key option on a through reflection in a nested through ↵Jon Leighton2010-10-191-1/+7
| | | | association
* Rename named_scope to scopePratik Naik2010-01-181-1/+1
|
* Adding :from scoping to ActiveRecord calculationsMatt Duncan2009-08-091-0/+2
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1229 state:committed]
* fix assignment to has_one :through associations.Matt Jones2008-11-151-0/+4
Signed-off-by: Michael Koziarski <michael@koziarski.com>