Class: ActionView::Helpers::DateTimeSelector
- Inherits:
-
Object
- Object
- ActionView::Helpers::DateTimeSelector
- Includes:
- HelperMethods
- Defined in:
- lib/slim_form_object/form_helpers/extension_actionview.rb
Overview
EXTENSIONS
Instance Method Summary collapse
Instance Method Details
#input_name_from_type(type) ⇒ Object
104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/slim_form_object/form_helpers/extension_actionview.rb', line 104 def input_name_from_type(type) prefix = @options[:prefix] || ActionView::Helpers::DateTimeSelector::DEFAULT_PREFIX prefix += "[#{@options[:index]}]" if @options.has_key?(:index) field_name = @options[:field_name] || type if @options[:include_position] field_name += "(#{ActionView::Helpers::DateTimeSelector::POSITION[type]}i)" end = self.instance_variable_get(:@options) return sfo_get_date_tag_name(prefix, field_name, ) if sfo_date_attr?(field_name) @options[:discard_type] ? prefix : "#{prefix}[#{field_name}]" end |