Class: ImageField
- Inherits:
-
AttachmentField
- Object
- Field
- AttachmentField
- ImageField
- Defined in:
- lib/yodel/models/core/fields/image_field.rb
Constant Summary
Constants inherited from Field
Instance Attribute Summary
Attributes inherited from Field
Instance Method Summary collapse
Methods inherited from AttachmentField
#after_destroy, #from_json, #json_action, #untypecast
Methods inherited from Field
#display?, field_from_type, #from_json, from_options, #include_in_search_keywords?, #index?, #inherited?, #initialize, #method_missing, #numeric?, #required?, #searchable?, #strip_nil?, #to_json, #to_str, #unique?, #untypecast, #validate
Constructor Details
This class inherits a constructor from Field
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Field
Instance Method Details
#default ⇒ Object
6 7 8 |
# File 'lib/yodel/models/core/fields/image_field.rb', line 6 def default Image.new({}, nil, self).to_hash end |
#default_input_type ⇒ Object
2 3 4 |
# File 'lib/yodel/models/core/fields/image_field.rb', line 2 def default_input_type :image end |
#typecast(value, record) ⇒ Object
10 11 12 |
# File 'lib/yodel/models/core/fields/image_field.rb', line 10 def typecast(value, record) Image.new(value, record, self) end |