Class: Brightcontent::ViewLookup::FormField

Inherits:
Base
  • Object
show all
Defined in:
lib/brightcontent/view_lookup/form_field.rb

Instance Attribute Summary

Attributes inherited from Base

#options, #view_context

Instance Method Summary collapse

Methods inherited from Base

#call, #initialize

Constructor Details

This class inherits a constructor from Brightcontent::ViewLookup::Base

Instance Method Details

#field_typeObject



8
9
10
11
# File 'lib/brightcontent/view_lookup/form_field.rb', line 8

def field_type
  column = options[:form].send(:find_attribute_column, options[:field])
  options[:form].send(:default_input_type, options[:field], column, {})
end

#render_defaultObject



4
5
6
# File 'lib/brightcontent/view_lookup/form_field.rb', line 4

def render_default
  options[:form].input(options[:field].to_sym)
end