Method: SuperModel::Base#dup
- Defined in:
- lib/supermodel/base.rb
#dup ⇒ Object
188 189 190 191 192 193 |
# File 'lib/supermodel/base.rb', line 188 def dup self.class.new.tap do |base| base.attributes = attributes base.new_record = new_record? end end |