aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods/query.rb
Commit message (Collapse)AuthorAgeFilesLines
* Move ActiveRecord::Type to ActiveModelKir Shatrov2015-09-211-1/+1
| | | | The first step of bringing typecasting to ActiveModel
* rm `Type#number?`Sean Griffin2015-02-071-2/+1
| | | | | This predicate is only used in `query_attribute`, and is relatively easy to remove without adding a bunch of is a checks.
* Remove most type related predicates from `Column`Sean Griffin2015-01-301-1/+2
| | | | | | Remaining are `limit`, `precision`, `scale`, and `type` (the symbol version). These will remain on the column, since they mirror the options to the `column` method in the schema definition DSL
* use self instead of #read_attributeankit19102014-08-261-1/+1
|
* Raise MissingAttributeError on query methodsErnie Miller2012-09-081-1/+1
| | | | | | | | | | | | | When calling a query method on an attribute that was not selected by an ActiveRecord query, an ActiveModel::MissingAttributeError is not raised. Instead, a nil value is returned, which will return false once cast to boolean. This is undesirable, as we should not give the impression that we know the attribute's boolean value when we haven't loaded the attribute's (possibly) non-boolean value from the database. This issue is present on versions going back as far as 2.3, at least.
* Minor refactor in ActiveRecord#initialize_dupCarlos Antonio da Silva2012-09-071-1/+0
| | | | | | * There is no need to delete the primary key from cloned attributes, since it sets the same pk to nil afterwards. * Check for empty? instead of any? to run initialize callbacks.
* load active_support/core_ext/object/blank in active_support/railsXavier Noria2012-08-021-1/+0
|
* pg supports real booleans, so handle the case when `true` is returnedAaron Patterson2012-02-061-2/+5
|
* adds missing requires for Object#blank? and Object#present?Xavier Noria2010-03-281-0/+2
|
* Revert "Refactoring attributes/types" [#3348 state:open]Pratik Naik2010-01-221-3/+17
| | | | | | | | | | | | | | | | | This reverts commit f936a1f100e75082081e782e5cceb272885c2df7. Conflicts: activerecord/lib/active_record.rb activerecord/lib/active_record/base.rb Revert "Fixed: #without_typecast should only disable typecasting on the duplicated attributes" [#3387 state:open] This reverts commit 2831996483c6a045f1f38d8030256eb58d9771c3. Reason : It's not generating attribute methods properly, making object.column 5x slower.
* Refactoring attributes/types [#3348 state:resolved]Eric Chapweske2009-10-171-17/+3
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Concernify AR AttributeMethodsJoshua Peek2009-07-301-0/+37