Class: Ezframe::CheckboxType
- Defined in:
- lib/ezframe/column_type.rb
Instance Attribute Summary
Attributes inherited from TypeBase
Instance Method Summary collapse
Methods inherited from TypeBase
#db_value, get_class, #initialize, #key, #label, #multi_inputs?, #no_edit?, #no_view?, #normalize, #type, type_name, #use_view_format, #validate, #value, #value=, #view
Constructor Details
This class inherits a constructor from Ezframe::TypeBase
Instance Method Details
#db_type ⇒ Object
344 345 346 |
# File 'lib/ezframe/column_type.rb', line 344 def db_type return "text" end |
#form(opts = {}) ⇒ Object
335 336 337 338 339 340 341 342 |
# File 'lib/ezframe/column_type.rb', line 335 def form(opts = {}) return nil if no_edit? && !opts[:force] key = self.key key ="#{key}#{opts[:key_suffix]}" if opts[:key_suffix] h = Ht.checkbox(name: key, value: parent[:id].value, label: @attribute[:label]) h[:class] = @attribute[:class] if @attribute[:class] return h end |