Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Pull more serialize code into a lazy included module | Jon Leighton | 2012-08-17 | 1 | -60/+63 |
| | |||||
* | Optimize instantiation for models which don't use serialize | Jon Leighton | 2012-08-17 | 1 | -13/+20 |
| | | | | Those z's were hard to type. | ||||
* | load active_support/core_ext/class/attribute in active_support/rails | Xavier Noria | 2012-08-02 | 2 | -2/+0 |
| | |||||
* | load active_support/core_ext/object/inclusion in active_support/rails | Xavier Noria | 2012-08-02 | 1 | -1/+0 |
| | |||||
* | load active_support/core_ext/object/blank in active_support/rails | Xavier Noria | 2012-08-02 | 2 | -2/+0 |
| | |||||
* | Do not consider the numeric attribute as changed if the old value is | Rafael Mendonça França | 2012-08-02 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | | | | zero and the new value is not a string. Before this commit this was the behavior r = Review.find_by_issue(0) r.issue => 0 r.changes => {} r.issue = 0 => 0 r.changed? => true r.changes => {"issue"=>[0,0]} Fixes #7237 Conflicts: activerecord/CHANGELOG.md | ||||
* | Added *instance_writer: false* for stored/serialized attributes. | kennyj | 2012-07-07 | 1 | -1/+1 |
| | |||||
* | changed the firm of changes_from_zero_to_string? | Angelo capilleri | 2012-06-21 | 1 | -2/+2 |
| | | | | delete *column* because is unused by the method. | ||||
* | Refactor the conditionals | Rafael Mendonça França | 2012-06-19 | 1 | -7/+7 |
| | |||||
* | Validates_numericality_of is skipped when changing 0 to to non-empty string | Angelo capilleri | 2012-06-19 | 1 | -5/+15 |
| | | | | | | | | | | This happens when A has_many many B and A accepts_nested_attributes B that has a numeric colum with initial 0 value. So a.update_attributes({:b_attributes => { :id => b.id, :numeric => 'foo' }}) passes the validation test but, the value of :numeric doesn't change. his commit forces that the update fails with the above conditions. Fixes #6393 Fixes #2331 | ||||
* | Simplify AR configuration code. | Jon Leighton | 2012-06-15 | 4 | -9/+23 |
| | | | | | Get rid of ActiveModel::Configuration, make better use of ActiveSupport::Concern + class_attribute, etc. | ||||
* | Fix #6591. If a field with timezone isn't changed, we don't call will_change!. | kennyj | 2012-06-04 | 1 | -1/+2 |
| | |||||
* | Fix #5797. Error calling dup method on AR model with serialized field | kennyj | 2012-05-30 | 1 | -3/+4 |
| | |||||
* | recurse in read_attribute we get caching / don't duplicate code | Jon Leighton | 2012-03-30 | 1 | -3/+2 |
| | |||||
* | Properly typecast id attribute when using custom primary key | Carlos Antonio da Silva | 2012-03-29 | 1 | -1/+4 |
| | |||||
* | much code can be deleted thanks to @tenderlove's refactoring | Jon Leighton | 2012-03-28 | 2 | -64/+6 |
| | |||||
* | attributes are cached by string keys, so to_s to support symbols. fixes #5549 | Aaron Patterson | 2012-03-27 | 1 | -1/+1 |
| | |||||
* | Remove IdentityMap | Carlos Antonio da Silva | 2012-03-13 | 1 | -5/+0 |
| | |||||
* | Remove unusused variables | Jon Leighton | 2012-03-04 | 1 | -3/+2 |
| | |||||
* | Merge pull request #5196 from lest/patch-3 | José Valim | 2012-02-28 | 1 | -0/+1 |
|\ | | | | | force datetime attributes to be changed, fix GH #3965 | ||||
| * | force datetime attributes to be changed, fix GH #3965 | Sergey Nartimov | 2012-02-28 | 1 | -0/+1 |
| | | |||||
* | | remove unnecessary code | Sergey Nartimov | 2012-02-28 | 1 | -6/+0 |
|/ | | | | | it was added in 36129f21b86db4bd69e932e586129e246c2a5ca8 but isn't useful anymore as corresponding tests pass without it | ||||
* | move id_before_type_cast to PrimaryKey module | Sergey Nartimov | 2012-02-16 | 2 | -6/+11 |
| | |||||
* | Rename field_changed? to _field_changed? so that users can create a field ↵ | Akira Matsuda | 2012-02-14 | 1 | -3/+3 |
| | | | | named field | ||||
* | handle id attribute in PrimaryKey module | Sergey Nartimov | 2012-02-11 | 1 | -0/+6 |
| | |||||
* | PG column consults oid types when typecasting | Aaron Patterson | 2012-02-10 | 1 | -0/+6 |
| | |||||
* | removing dead code | Aaron Patterson | 2012-02-09 | 3 | -22/+0 |
| | |||||
* | Merge branch 'master' into instance_reader | Aaron Patterson | 2012-02-09 | 1 | -0/+8 |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (30 commits) Bump tzinfo. 0.3.31 was released on November 6, 2011. Fix GH #4909. Dependency on TZInfo move from AR to AS. moving ordered hash to normal hash because ruby 1.9.3 hash defaultly ordered one Refactored the OrderedHash related stuff Replaced OrderedHash usage with Ruby 1.9 Hash Replaced OrderedHash with Hash for ruby 1.9 series removed unnecessary code replacing the orderhash with hash for ruby-1.9 Clean up some wording. Fix typo. test title changed corresponding to the test replaced active support ordered hash to ruby hash on active resource PostgreSQL does not work in the same way of the other adapters AR::Relation#pluck: improve to work with joins Fix match docs Fix attribute_before_type_cast for serialized attributes. Fixes #4837. Fix failing request test Fixes in AMo README Update README to mention lint. Trim down Active Model API by removing valid? and errors.full_messages ... | ||||
| * | Fix attribute_before_type_cast for serialized attributes. Fixes #4837. | Jon Leighton | 2012-02-07 | 1 | -0/+8 |
| | | |||||
* | | only exclude serialized columns from cacheable columns | Aaron Patterson | 2012-02-09 | 1 | -1/+5 |
| | | |||||
* | | removed unnecessary translator object | Aaron Patterson | 2012-02-08 | 1 | -16/+0 |
| | | |||||
* | | use the key name yielded to the fetch block | Aaron Patterson | 2012-02-08 | 1 | -9/+7 |
| | | |||||
* | | return early if the cast attribute has been cached | Aaron Patterson | 2012-02-08 | 1 | -11/+16 |
| | | |||||
* | | always call `read_attribute` from the reader method | Aaron Patterson | 2012-02-08 | 1 | -14/+12 |
| | | |||||
* | | cache attribute if it is supposed to be cached | Aaron Patterson | 2012-02-07 | 1 | -1/+5 |
| | | |||||
* | | give each PG type a `type` method and decortate tz attributes | Aaron Patterson | 2012-02-07 | 2 | -1/+22 |
| | | |||||
* | | moving column types to an ivar on the result | Aaron Patterson | 2012-02-07 | 1 | -1/+5 |
| | | |||||
* | | wrap and cache columns for typecasting | Aaron Patterson | 2012-02-07 | 1 | -0/+10 |
| | | |||||
* | | moved attribute translation to an object | Aaron Patterson | 2012-02-07 | 1 | -16/+10 |
| | | |||||
* | | moved most of the evald code in to regular ruby code | Aaron Patterson | 2012-02-07 | 3 | -17/+32 |
| | | |||||
* | | copy the columns hash to the active record instances, typecast using columns ↵ | Aaron Patterson | 2012-02-07 | 3 | -36/+64 |
|/ | | | | looked up on the instance | ||||
* | adding a comment for myself | Aaron Patterson | 2012-02-06 | 1 | -8/+8 |
| | |||||
* | delegate attribute typecasting to the column | Aaron Patterson | 2012-02-06 | 1 | -16/+2 |
| | |||||
* | pg supports real booleans, so handle the case when `true` is returned | Aaron Patterson | 2012-02-06 | 1 | -2/+5 |
| | |||||
* | The primary key is always initialized in the @attributes hash to nil (unless | Aaron Patterson | 2012-01-25 | 1 | -5/+1 |
| | | | | another value has been specified). | ||||
* | use fetch rather than both Hash#key? and Hash#[] | Aaron Patterson | 2012-01-25 | 1 | -49/+51 |
| | |||||
* | Revert "just use an alias. The target method is public, so make this one ↵ | Aaron Patterson | 2012-01-20 | 1 | -1/+4 |
| | | | | | | public" This reverts commit be7d2248e9505983d1aacf0b33c657e6e3ddd9db. | ||||
* | just use an alias. The target method is public, so make this one public | Aaron Patterson | 2012-01-19 | 1 | -4/+1 |
| | | | | too. | ||||
* | Expanded rdoc about primary keys being protected from mass assignment. | Joost Baaij | 2012-01-06 | 1 | -1/+2 |
| | | | People need to make sure they are generated internally or added to attr_accessible so they can be mass assigned (for instance, from an import job). | ||||
* | Support configuration on ActiveRecord::Model. | Jon Leighton | 2011-12-28 | 4 | -6/+10 |
| | | | | | | | | | | | | | | | The problem: We need to be able to specify configuration in a way that can be inherited to models that include ActiveRecord::Model. So it is no longer sufficient to put 'top level' config on ActiveRecord::Base, but we do want configuration specified on ActiveRecord::Base and descendants to continue to work. So we need something like class_attribute that can be defined on a module but that is inherited when ActiveRecord::Model is included. The solution: added ActiveModel::Configuration module which provides a config_attribute macro. It's a bit specific hence I am not putting this in Active Support or making it a 'public API' at present. |