Method: Ezframe::SelectType#form

Defined in:
lib/ezframe/column_type.rb

#form(opts = {}) ⇒ Object



234
235
236
237
238
239
240
# File 'lib/ezframe/column_type.rb', line 234

def form(opts = {})
  return nil if no_edit? && !opts[:force]
  # puts "selectType: #{@attribute[:item].inspect}"
  h = { tag: "select", name: self.key, label: @attribute[:label], item: @attribute[:item], value: @value }
  h[:class] = @attribute[:class] if @attribute[:class]
  return h
end