Class: Symphonia::ModelAttributes::EnumAttribute
- Defined in:
- lib/symphonia/model_attributes/attribute.rb
Instance Attribute Summary
Attributes inherited from Attribute
#filter, #format_options, #name, #options, #sort_column
Instance Method Summary collapse
-
#format_value(view, value, entity) ⇒ Object
TODO: @klass.name || @klass.base_class.name || entity.class.name.
- #input_field ⇒ Object
- #input_options ⇒ Object
Methods inherited from Attribute
#default?, #filter?, #format, #initialize, #required?, #sort=, #sort?, #title, #value
Constructor Details
This class inherits a constructor from Symphonia::ModelAttributes::Attribute
Instance Method Details
#format_value(view, value, entity) ⇒ Object
TODO: @klass.name || @klass.base_class.name || entity.class.name
101 102 103 |
# File 'lib/symphonia/model_attributes/attribute.rb', line 101 def format_value(view, value, entity) view.t("#{@klass.name.underscore}.#{name.to_s.pluralize}.#{value}", ) end |
#input_field ⇒ Object
105 106 107 |
# File 'lib/symphonia/model_attributes/attribute.rb', line 105 def input_field :select end |
#input_options ⇒ Object
109 110 111 |
# File 'lib/symphonia/model_attributes/attribute.rb', line 109 def [] end |