Changeset 8280
- Timestamp:
- 12/05/07 14:22:26 (5 months ago)
- Files:
-
- trunk/activerecord/CHANGELOG (modified) (1 diff)
- trunk/activerecord/lib/active_record/base.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activerecord/CHANGELOG
r8259 r8280 1 1 *SVN* 2 3 * Document automatically generated predicate methods for attributes. Closes #10373 [chuyeow] 2 4 3 5 * Added ActiveRecord::Base#becomes to turn a record into one of another class (mostly relevant for STIs) [DHH]. Example: trunk/activerecord/lib/active_record/base.rb
r8260 r8280 155 155 # You can alternatively use self[:attribute]=(value) and self[:attribute] instead of write_attribute(:attribute, value) and 156 156 # read_attribute(:attribute) as a shorter form. 157 # 158 # == Attribute query methods 159 # 160 # In addition to the basic accessors, query methods are also automatically available on the Active Record object. 161 # Query methods allow you to test whether an attribute value is present. 162 # 163 # For example, an Active Record User with the <tt>name</tt> attribute has a <tt>name?</tt> method that you can call 164 # to determine whether the user has a name: 165 # 166 # user = User.new(:name => "David") 167 # user.name? # => true 168 # 169 # anonymous = User.new(:name => "") 170 # anonymous.name? # => false 157 171 # 158 172 # == Accessing attributes before they have been typecasted