aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove unusused variablesJon Leighton2012-03-041-3/+2
|
* Merge pull request #5196 from lest/patch-3José Valim2012-02-281-0/+1
|\ | | | | force datetime attributes to be changed, fix GH #3965
| * force datetime attributes to be changed, fix GH #3965Sergey Nartimov2012-02-281-0/+1
| |
* | remove unnecessary codeSergey Nartimov2012-02-281-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 moduleSergey Nartimov2012-02-162-6/+11
|
* Rename field_changed? to _field_changed? so that users can create a field ↵Akira Matsuda2012-02-141-3/+3
| | | | named field
* handle id attribute in PrimaryKey moduleSergey Nartimov2012-02-111-0/+6
|
* PG column consults oid types when typecastingAaron Patterson2012-02-101-0/+6
|
* removing dead codeAaron Patterson2012-02-093-22/+0
|
* Merge branch 'master' into instance_readerAaron Patterson2012-02-091-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 Leighton2012-02-071-0/+8
| |
* | only exclude serialized columns from cacheable columnsAaron Patterson2012-02-091-1/+5
| |
* | removed unnecessary translator objectAaron Patterson2012-02-081-16/+0
| |
* | use the key name yielded to the fetch blockAaron Patterson2012-02-081-9/+7
| |
* | return early if the cast attribute has been cachedAaron Patterson2012-02-081-11/+16
| |
* | always call `read_attribute` from the reader methodAaron Patterson2012-02-081-14/+12
| |
* | cache attribute if it is supposed to be cachedAaron Patterson2012-02-071-1/+5
| |
* | give each PG type a `type` method and decortate tz attributesAaron Patterson2012-02-072-1/+22
| |
* | moving column types to an ivar on the resultAaron Patterson2012-02-071-1/+5
| |
* | wrap and cache columns for typecastingAaron Patterson2012-02-071-0/+10
| |
* | moved attribute translation to an objectAaron Patterson2012-02-071-16/+10
| |
* | moved most of the evald code in to regular ruby codeAaron Patterson2012-02-073-17/+32
| |
* | copy the columns hash to the active record instances, typecast using columns ↵Aaron Patterson2012-02-073-36/+64
|/ | | | looked up on the instance
* adding a comment for myselfAaron Patterson2012-02-061-8/+8
|
* delegate attribute typecasting to the columnAaron Patterson2012-02-061-16/+2
|
* pg supports real booleans, so handle the case when `true` is returnedAaron Patterson2012-02-061-2/+5
|
* The primary key is always initialized in the @attributes hash to nil (unlessAaron Patterson2012-01-251-5/+1
| | | | another value has been specified).
* use fetch rather than both Hash#key? and Hash#[]Aaron Patterson2012-01-251-49/+51
|
* Revert "just use an alias. The target method is public, so make this one ↵Aaron Patterson2012-01-201-1/+4
| | | | | | public" This reverts commit be7d2248e9505983d1aacf0b33c657e6e3ddd9db.
* just use an alias. The target method is public, so make this one publicAaron Patterson2012-01-191-4/+1
| | | | too.
* Expanded rdoc about primary keys being protected from mass assignment. Joost Baaij2012-01-061-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 Leighton2011-12-284-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.
* Deal with global config better between AR::Base and AR::ModelJon Leighton2011-12-242-7/+3
|
* Doh, remove debugging lineJon Leighton2011-12-231-1/+0
|
* Fix #4046.Jon Leighton2011-12-231-4/+3
|
* Make read_attribute code path accessible at the class levelJon Leighton2011-12-222-27/+33
|
* remove deprecated set and original methods for table_name, primary_key, etcSergey Nartimov2011-12-211-9/+0
|
* remove deprecated underscore versions of attribute methodsSergey Nartimov2011-12-211-32/+0
|
* Fix the build on postgres. Note: we should probably actually make schema ↵Jon Leighton2011-12-161-1/+1
| | | | mutations bust the cache.
* Don't store defaults in the schema cacheJon Leighton2011-12-161-2/+2
|
* Cache columns at the model level.Jon Leighton2011-12-161-2/+0
| | | | Allows two models to use the same table but have different primary keys.
* Split out most of the AR::Base code into separate modules :cake:Jon Leighton2011-12-151-0/+12
|
* Fix #3987.Jon Leighton2011-12-151-0/+2
|
* Stop the build asploding on 1.8.7Jon Leighton2011-12-141-0/+2
|
* Use a separate module for 'external' attribute methods.Jon Leighton2011-12-142-17/+12
|
* use the schema cache when asking for the primary keyAaron Patterson2011-12-121-1/+1
|
* fixing eval'd line numbers.Aaron Patterson2011-12-081-2/+2
|
* Fix #3837.Jon Leighton2011-12-031-11/+5
| | | | | We also need to time zone convert time zone aware attributes when accessed via read_attribute, not only when via direct access.
* Revert "Roflscaling!" (for now)Jon Leighton2011-12-022-8/+11
| | | | | | | | This reverts commit f6b5046305d43c5f64bcb6fed0e44f7bca99a603. Fear not, the roflscale will return when I have a bit more time and figure out a better way to do it. (In particular, a way that doesn't break the build.)
* Fewer string allocations in attribute methodJon Leighton2011-12-011-4/+4
|