Module: Mongoid::Fields::Serializable::ClassMethods
- Defined in:
- lib/mongoid/fields/serializable.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#instantiate(name, options = {}) ⇒ Object
Create the new field with a name and optional additional options.
Instance Method Details
#instantiate(name, options = {}) ⇒ Object
Create the new field with a name and optional additional options.
243 244 245 246 247 248 249 250 251 |
# File 'lib/mongoid/fields/serializable.rb', line 243 def instantiate(name, = {}) allocate.tap do |field| field.name = name field. = field.label = [:label] field.localize = [:localize] field.default_val = [:default] end end |