Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | save attributes changed by callbacks after update_attribute | Mike Busch | 2017-12-22 | 1 | -0/+7 |
| | | | | | | | | update_attribute previously stopped execution, before saving and before running callbacks, if the record's attributes hadn't changed. [The documentation](http://api.rubyonrails.org/classes/ActiveRecord/Persistence.html#method-i-update_attribute) says that "Callbacks are invoked", which was not happening if the persisted attributes hadn't changed. | ||||
* | Use frozen-string-literal in ActiveRecord | Kir Shatrov | 2017-07-19 | 1 | -0/+2 |
| | |||||
* | Revert "Merge pull request #29540 from kirs/rubocop-frozen-string" | Matthew Draper | 2017-07-02 | 1 | -1/+0 |
| | | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa. | ||||
* | Enforce frozen string in Rubocop | Kir Shatrov | 2017-07-01 | 1 | -0/+1 |
| | |||||
* | Enable extending even if scope returns nil | Ryuta Kamizono | 2017-05-24 | 1 | -1/+1 |
| | |||||
* | Privatize unneededly protected methods in Active Record tests | Akira Matsuda | 2016-12-24 | 1 | -1/+1 |
| | |||||
* | code gardening: removes redundant selfs | Xavier Noria | 2016-08-08 | 1 | -1/+1 |
| | | | | | | | | | A few have been left for aesthetic reasons, but have made a pass and removed most of them. Note that if the method `foo` returns an array, `foo << 1` is a regular push, nothing to do with assignments, so no self required. | ||||
* | modernizes hash syntax in activerecord | Xavier Noria | 2016-08-06 | 1 | -8/+8 |
| | |||||
* | applies new string literal convention in activerecord/test | Xavier Noria | 2016-08-06 | 1 | -7/+7 |
| | | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default. | ||||
* | Oracle TIMESTAMP sql type is associated with Rails `DateTime` type now | Yasuo Honda | 2016-07-20 | 1 | -6/+0 |
| | | | | | | - Refer https://github.com/rsim/oracle-enhanced/pull/845 Remove `set_date_columns` which has been deprecated in Oracle enhanced adapter - Refer https://github.com/rsim/oracle-enhanced/pull/869 | ||||
* | Deprecate passing conditions to AR::Relation destroy_all and delete_all methods | Wojciech Wnętrzak | 2015-09-06 | 1 | -1/+1 |
| | |||||
* | fix rails tests | Mehmet Emin İNAÇ | 2015-07-21 | 1 | -1/+1 |
| | |||||
* | changed update counter to act on unscoped model | heruku | 2013-11-26 | 1 | -0/+4 |
| | |||||
* | More unused associations in AR test models | Akira Matsuda | 2013-09-10 | 1 | -1/+0 |
| | |||||
* | Revert "Merge branch 'master' of github.com:rails/docrails" | Vijay Dev | 2013-08-17 | 1 | -0/+1 |
| | | | | | | | This reverts commit 70d6e16fbad75b89dd1798ed697e7732b8606fa3, reversing changes made to ea4db3bc078fb3093ecdddffdf4f2f4ff3e1e8f9. Seems to be a code merge done by mistake. | ||||
* | More unused associations in AR test models | Akira Matsuda | 2013-07-25 | 1 | -1/+0 |
| | |||||
* | Describing the reason for defining BlankTopic#blank? which will never be called | Akira Matsuda | 2013-01-24 | 1 | -0/+1 |
| | |||||
* | Revert "Unused methods, module, etc." | Akira Matsuda | 2013-01-24 | 1 | -0/+9 |
| | | | | | | This reverts commit 4e05bfb8e254c3360a3ca4a6cb332995314338fe. Reason: BlankTopic#blank? should not be removed to check that dynamic finder with a bang can find a model that responds to `blank?` | ||||
* | Unused methods, module, etc. | Akira Matsuda | 2013-01-24 | 1 | -9/+0 |
| | |||||
* | Regression test for #7238 | Nikita Afanasenko | 2012-11-13 | 1 | -0/+6 |
| | |||||
* | :counter_cache option for to support custom named counter caches. Closes #7993 | Yves Senn | 2012-11-04 | 1 | -0/+1 |
| | |||||
* | Deprecate ActiveRecord::Base.scoped. | Jon Leighton | 2012-07-27 | 1 | -3/+3 |
| | | | | | | | It doesn't serve much purpose now that ActiveRecord::Base.all returns a Relation. The code is moved to active_record_deprecated_finders. | ||||
* | made dynamic finders alias_attribute aware | Maximilian Schneider | 2012-06-22 | 1 | -0/+2 |
| | | | | | previously dynamic finders only worked in combination with the actual column name and not its alias defined with #alias_attribute | ||||
* | remove unnecessary test code | Jon Leighton | 2012-04-27 | 1 | -5/+1 |
| | |||||
* | remove deprecated scope stuff | Jon Leighton | 2012-04-26 | 1 | -13/+1 |
| | |||||
* | extract deprecated code | Jon Leighton | 2012-04-25 | 1 | -2/+2 |
| | |||||
* | Deprecate eager-evaluated scopes. | Jon Leighton | 2012-03-21 | 1 | -10/+13 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 | ||||
* | Fixed after_initialize callbacks call on AR model #dup | Bogdan Gusiev | 2012-01-07 | 1 | -0/+5 |
| | |||||
* | serialize fails on subclass | Alvaro Bautista | 2011-12-23 | 1 | -0/+4 |
| | |||||
* | call scope within unscoped to prevent duplication of where values | Sergey Nartimov | 2011-12-17 | 1 | -0/+2 |
| | |||||
* | Make protected method public so we avoid method_missing. | Jon Leighton | 2011-09-13 | 1 | -4/+5 |
| | |||||
* | Revert "Deprecate defining scopes with a callable (lambda, proc, etc) via ↵ | Jon Leighton | 2011-04-17 | 1 | -15/+11 |
| | | | | | | | | | | the scope class method. Just define a class method yourself instead." This reverts commit f0e198bfa1e3f9689e0cde1d194a44027fc90b3c. Conflicts: activerecord/test/models/post.rb | ||||
* | Deprecate defining scopes with a callable (lambda, proc, etc) via the scope ↵ | Jon Leighton | 2011-04-12 | 1 | -11/+15 |
| | | | | class method. Just define a class method yourself instead. | ||||
* | DRY up the code which instantiates the association proxy | Jon Leighton | 2011-01-11 | 1 | -0/+4 |
| | |||||
* | use persisted? instead of new_record? wherever possible | David Chelimsky | 2010-11-09 | 1 | -1/+1 |
| | | | | | | | | | | | - persisted? is the API defined in ActiveModel - makes it easier for extension libraries to conform to ActiveModel APIs without concern for whether the extended object is specifically ActiveRecord [#5927 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | scopes can take an object that responds to `call` | Aaron Patterson | 2010-10-19 | 1 | -0/+7 |
| | |||||
* | Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵ | Santiago Pastorino | 2010-08-14 | 1 | -1/+1 |
| | | | | 's/[ \t]*$//' -i {} \;) | ||||
* | Explicitly set Topic model last_read attribute as Date value when Oracle ↵ | Raimonds Simanovskis | 2010-06-04 | 1 | -0/+6 |
| | | | | | | enhanced adapter is used (otherwise some tests are failing which assume that this attribute will have Date value) | ||||
* | Rename named_scope to scope | Pratik Naik | 2010-01-18 | 1 | -11/+11 |
| | |||||
* | Refactor new callbacks and AR implementation. | José Valim | 2009-09-08 | 1 | -1/+16 |
| | | | | Signed-off-by: Joshua Peek <josh@joshpeek.com> | ||||
* | Changed ActiveRecord to use new callbacks and speed up observers by only ↵ | José Valim | 2009-09-08 | 1 | -1/+1 |
| | | | | | | notifying events that are actually being consumed. Signed-off-by: Joshua Peek <josh@joshpeek.com> | ||||
* | Revert "Methods invoked within named scope Procs should respect the scope ↵ | Jeremy Kemper | 2009-07-29 | 1 | -2/+0 |
| | | | | | | | | | | stack. [#1267 state:resolved]" This reverts commit 6a13376525f34a00e013fc3a6022838329dfe856. Conflicts: activerecord/test/cases/named_scope_test.rb | ||||
* | Add primary_key option to belongs_to association | Szymon Nowak | 2009-07-15 | 1 | -0/+1 |
| | | | | | | [#765 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Returning nil from named scope lambda is equivalent to an empty hash [#1773 ↵ | Elijah Miller | 2009-03-12 | 1 | -1/+3 |
| | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Ensure belongs_to association with a counter cache in name spaced model ↵ | Adam Cooper | 2009-03-06 | 1 | -0/+6 |
| | | | | | | works [#1678 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Methods invoked within named scope Procs should respect the scope stack. ↵ | jvoorhis | 2009-03-06 | 1 | -0/+2 |
| | | | | | | [#1267 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Make sure inner scope conditions get a preference over the outer ones | Pratik Naik | 2009-01-24 | 1 | -0/+2 |
| | |||||
* | Fix file permissions | Tarmo Tänav | 2008-07-31 | 1 | -0/+0 |
| | | | | Signed-off-by: Joshua Peek <josh@joshpeek.com> | ||||
* | Ensure NamedScope#build/create/create!/new works as expected when named ↵ | Daniel Guettler | 2008-07-09 | 1 | -0/+2 |
| | | | | | | scope has hash conditions. [Daniel Guettler, Pratik Naik] [#419 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Add extra hash conditions tests for named_scope | Pratik Naik | 2008-06-28 | 1 | -0/+1 |
| |