Changeset 8858
- Timestamp:
- 02/11/08 21:02:17 (3 months ago)
- Files:
-
- trunk/activerecord/lib/active_record/base.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activerecord/lib/active_record/base.rb
r8855 r8858 2089 2089 # left to the application to implement according to its need. 2090 2090 def clone 2091 attrs = self.attributes_before_type_cast2091 attrs = clone_attributes(:read_attribute_before_type_cast) 2092 2092 attrs.delete(self.class.primary_key) 2093 2093 record = self.class.new … … 2237 2237 end 2238 2238 2239 # Returns a hash of clonedattributes before typecasting and deserialization.2239 # Returns a hash of attributes before typecasting and deserialization. 2240 2240 def attributes_before_type_cast 2241 clone_attributes :read_attribute_before_type_cast 2241 attrs = {} 2242 self.attribute_names.each do |name| 2243 attrs[name]=read_attribute_before_type_cast(name) 2244 end 2245 attrs 2242 2246 end 2243 2247