Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Use TS::Cache instead of Mutex + Hash. | thedarkone | 2013-09-28 | 1 | -12/+8 |
| | | | | TS::Cache#compute_if_absent guarantees that only a single thread will get to execute the provided block for a given key. | ||||
* | Remove deprecation warning from attribute_missing | Arun Agrawal | 2013-07-15 | 1 | -14/+0 |
| | | | for attributes that are columns. | ||||
* | Avoid creating an extra Range instance | Akira Matsuda | 2013-07-10 | 1 | -1/+1 |
| | |||||
* | Fix: attribute_for_inspect truncate upto (51 => 50) characters. | namusyaka | 2013-07-09 | 1 | -2/+2 |
| | |||||
* | refactor the method cache objects to have a superclass | Aaron Patterson | 2013-07-03 | 1 | -0/+25 |
| | |||||
* | move the reader method cache in to the read module | Aaron Patterson | 2013-07-03 | 1 | -48/+0 |
| | |||||
* | keep a cache of the reader methods so we can reuse them | Aaron Patterson | 2013-07-03 | 1 | -0/+48 |
| | |||||
* | freeze the constant value so it isn't duped when used as a hash key | Aaron Patterson | 2013-07-02 | 1 | -1/+1 |
| | |||||
* | stop storing multiple copies of a particular attribute name | Aaron Patterson | 2013-07-02 | 1 | -12/+10 |
| | |||||
* | eagerly assign the attribute name cache, remove const_missing | Aaron Patterson | 2013-07-02 | 1 | -2/+5 |
| | |||||
* | initialize generated modules on inclusion and on inheritence | Aaron Patterson | 2013-07-02 | 1 | -1/+1 |
| | |||||
* | push attribute constant cache in to the attribute methods module | Aaron Patterson | 2013-07-02 | 1 | -1/+9 |
| | |||||
* | lock around mutating the generated methods module | Aaron Patterson | 2013-07-02 | 1 | -2/+4 |
| | |||||
* | remove private attribute reader | Aaron Patterson | 2013-07-02 | 1 | -6/+2 |
| | |||||
* | define attribute methods in a thread safe manner | Aaron Patterson | 2013-07-02 | 1 | -5/+4 |
| | |||||
* | we don't need to use active support *everwhere* common. | Aaron Patterson | 2013-07-02 | 1 | -1/+1 |
| | |||||
* | initialize ivars so we don't have to constantly check them | Aaron Patterson | 2013-07-02 | 1 | -1/+3 |
| | |||||
* | eagerly initialize the attributes module to avoid check-then-set race conditions | Aaron Patterson | 2013-07-02 | 1 | -1/+12 |
| | |||||
* | fixes a test, and explains why AR::AttributeMethods checks ↵ | Xavier Noria | 2013-04-28 | 1 | -0/+3 |
| | | | | defined?(@attributes) in some places | ||||
* | ActiveRecord -> Active Record | Xavier Noria | 2013-04-25 | 1 | -1/+1 |
| | |||||
* | fixes warning in the AR test suite | Xavier Noria | 2013-04-25 | 1 | -1/+1 |
| | |||||
* | if singletons belong to the contract, test them | Xavier Noria | 2013-04-20 | 1 | -1/+1 |
| | | | | | | Object#respond_to? returns singletons and thus we inherit that contract. The implementation of the predicate is good, but the test is only checking boolean semantics, which in this case is not enough. | ||||
* | fix respond_to? for non selected column | Neeraj Singh | 2013-04-19 | 1 | -1/+13 |
| | | | | | | | | | | | | | | | | | | | | | | | fixes #4208 If a query selects only a few columns and gives custom names to those columns then respond_to? was returning true for the non selected columns. However calling those non selected columns raises exception. post = Post.select("'title' as post_title").first In the above case when `post.body` is invoked then an exception is raised since `body` attribute is not selected. Howevere `respond_to?` did not behave correctly. pos.respond_to?(:body) #=> true Reason was that Active Record calls `super` to pass the call to Active Model and all the columns are defined on Active Model. Fix is to actually check if the data returned from the db contains the data for column in question. | ||||
* | Fixed typos in activerecord | Prathamesh Sonpatki | 2013-03-27 | 1 | -1/+1 |
| | |||||
* | When we pass id to update_attributes it will try to set new id for that record | Dmitry Vorotilin | 2013-03-22 | 1 | -1/+1 |
| | |||||
* | fix typos in AR. lots of them. | Vipul A M | 2013-03-19 | 1 | -1/+1 |
| | |||||
* | Keep the code related to serialization in Serialization module. | Nikita Afanasenko | 2012-11-10 | 1 | -8/+4 |
| | | | | We should not need any `serialized_attributes` checks outside `ActiveRecord::AttributeMethods::Serialization` module. | ||||
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-11-03 | 1 | -10/+15 |
|\ | | | | | | | | | | | | | Conflicts: actionpack/lib/action_controller/metal/mime_responds.rb activerecord/lib/active_record/attribute_methods.rb guides/source/working_with_javascript_in_rails.md | ||||
| * | read_attribute is public [ci skip] | Francesco Rodriguez | 2012-10-21 | 1 | -1/+1 |
| | | |||||
| * | improve AR::AttributeMethods documentation [ci skip] | Francesco Rodriguez | 2012-10-21 | 1 | -6/+10 |
| | | |||||
| * | Fix AR::AttributeMethods#[] example [ci skip] | Francesco Rodriguez | 2012-10-21 | 1 | -1/+1 |
| | | |||||
* | | AR::AttributeMethods#[] raises AM::AttributeMissingError for missing attributes. | Francesco Rodriguez | 2012-10-28 | 1 | -2/+8 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following behaviour: class Person < ActiveRecord::Base belongs_to :company end # Before: person = Person.select('id').first person[:name] # => nil person.name # => ActiveModel::MissingAttributeError: missing_attribute: name person[:company_id] # => nil person.company # => nil # After: person = Person.select('id').first person[:name] # => ActiveModel::MissingAttributeError: missing_attribute: name person.name # => ActiveModel::MissingAttributeError: missing_attribute: name person[:company_id] # => ActiveModel::MissingAttributeError: missing_attribute: company_id person.company # => ActiveModel::MissingAttributeError: missing_attribute: company_id Fixes #5433. | ||||
* | | Remove ActiveRecord::Model | Jon Leighton | 2012-10-26 | 1 | -1/+1 |
|/ | | | | | | | | | | In the end I think the pain of implementing this seamlessly was not worth the gain provided. The intention was that it would allow plain ruby objects that might not live in your main application to be subclassed and have persistence mixed in. But I've decided that the benefit of doing that is not worth the amount of complexity that the implementation introduced. | ||||
* | update AR::AttributeMethods documentation [ci skip] | Francesco Rodriguez | 2012-10-21 | 1 | -23/+124 |
| | |||||
* | Support for partial inserts. | Jon Leighton | 2012-09-28 | 1 | -5/+5 |
| | | | | | | | | | | | When inserting new records, only the fields which have been changed from the defaults will actually be included in the INSERT statement. The other fields will be populated by the database. This is more efficient, and also means that it will be safe to remove database columns without getting subsequent errors in running app processes (so long as the code in those processes doesn't contain any references to the removed column). | ||||
* | load active_support/deprecation in active_support/rails | Xavier Noria | 2012-08-02 | 1 | -1/+0 |
| | |||||
* | no need to define methods in included hook | Jon Leighton | 2012-06-15 | 1 | -13/+13 |
| | |||||
* | Use each_with_object instead of each here | Santiago Pastorino | 2012-06-09 | 1 | -3/+3 |
| | |||||
* | Merge pull request #6687 from tiegz/3-2-optimizations | José Valim | 2012-06-09 | 1 | -1/+3 |
| | | | | ActiveRecord#attributes optimization: minimize objects created | ||||
* | much code can be deleted thanks to @tenderlove's refactoring | Jon Leighton | 2012-03-28 | 1 | -8/+0 |
| | |||||
* | Merge pull request #5294 from robinroestenburg/master | Aaron Patterson | 2012-03-12 | 1 | -23/+50 |
|\ | | | | | Refactoring of `arel_attributes_values` method | ||||
| * | Removed flag attributes. | Robin Roestenburg | 2012-03-06 | 1 | -19/+32 |
| | | |||||
| * | Refactored method arel_attributes_values. | Robin Roestenburg | 2012-03-06 | 1 | -20/+34 |
| | | |||||
* | | attribute_present? should return false for empty strings | Jacob Green | 2012-03-06 | 1 | -1/+1 |
|/ | |||||
* | handle id attribute in PrimaryKey module | Sergey Nartimov | 2012-02-11 | 1 | -1/+1 |
| | |||||
* | adding a comment for myself | Aaron Patterson | 2012-02-06 | 1 | -0/+1 |
| | |||||
* | Fix another race condition. | Jon Leighton | 2012-01-20 | 1 | -3/+0 |
| | | | | | | From 2c667f69aa2daac5ee6c29ca9679616e2a71532a. Thanks @pwnall for the heads-up. | ||||
* | Fix race condition :bomb: | Jon Leighton | 2012-01-13 | 1 | -4/+11 |
| | |||||
* | Revert "Base#[] and Base#[]= are aliases so implement them as aliases :)" | Tom Stuart | 2012-01-11 | 1 | -4/+6 |
| | | | | This reverts commit 21eadc1b3f2eb818a4833381ee0a6cfa205f2955. | ||||
* | Support establishing connection on ActiveRecord::Model. | Jon Leighton | 2011-12-28 | 1 | -1/+1 |
| | | | | | This is the 'top level' connection, inherited by any models that include ActiveRecord::Model or inherit from ActiveRecord::Base. |