Class: ActiveInteraction::Extras::ModelFields::Context
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- ActiveInteraction::Extras::ModelFields::Context
- Defined in:
- lib/active_interaction/extras/model_fields.rb
Instance Attribute Summary collapse
-
#from_model_name ⇒ Object
Returns the value of attribute from_model_name.
-
#model_field_cache ⇒ Object
Returns the value of attribute model_field_cache.
Instance Method Summary collapse
- #custom_filter_attribute(name, opts = {}) ⇒ Object (also: #interface, #date, #time, #date_time, #integer, #decimal, #float, #string, #symbol, #object, #hash, #file, #boolean, #array, #record, #anything, #uuid)
Instance Attribute Details
#from_model_name ⇒ Object
Returns the value of attribute from_model_name.
29 30 31 |
# File 'lib/active_interaction/extras/model_fields.rb', line 29 def from_model_name @from_model_name end |
#model_field_cache ⇒ Object
Returns the value of attribute model_field_cache.
30 31 32 |
# File 'lib/active_interaction/extras/model_fields.rb', line 30 def model_field_cache @model_field_cache end |
Instance Method Details
#custom_filter_attribute(name, opts = {}) ⇒ Object Also known as: interface, date, time, date_time, integer, decimal, float, string, symbol, object, hash, file, boolean, array, record, anything, uuid
32 33 34 35 36 37 |
# File 'lib/active_interaction/extras/model_fields.rb', line 32 def custom_filter_attribute(name, opts = {}) from_model_name = self.from_model_name model_field_cache[from_model_name] = model_field_cache[from_model_name] << name __getobj__.send __callee__, name, opts end |