File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
activerecord/lib/active_record Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -119,23 +119,22 @@ module ActiveRecord #:nodoc:
119119 # All column values are automatically available through basic accessors on the Active Record
120120 # object, but sometimes you want to specialize this behavior. This can be done by overwriting
121121 # the default accessors (using the same name as the attribute) and calling
122- # <tt>read_attribute(attr_name)</tt> and <tt>write_attribute(attr_name, value)</tt> to actually
123- # change things.
122+ # +super+ to actually change things.
124123 #
125124 # class Song < ActiveRecord::Base
126125 # # Uses an integer of seconds to hold the length of the song
127126 #
128127 # def length=(minutes)
129- # write_attribute(:length, minutes.to_i * 60)
128+ # super( minutes.to_i * 60)
130129 # end
131130 #
132131 # def length
133- # read_attribute(:length) / 60
132+ # super / 60
134133 # end
135134 # end
136135 #
137136 # You can alternatively use <tt>self[:attribute]=(value)</tt> and <tt>self[:attribute]</tt>
138- # instead of <tt>write_attribute(:attribute, value)</tt> and <tt>read_attribute(:attribute)</tt>.
137+ # or <tt>write_attribute(:attribute, value)</tt> and <tt>read_attribute(:attribute)</tt>.
139138 #
140139 # == Attribute query methods
141140 #
You can’t perform that action at this time.
0 commit comments