Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v6.1.7.7) is shown here.
input_name_from_type(type)
private
Returns the name attribute for the input tag.
=> post[written_on(1i)]
# File actionview/lib/action_view/helpers/date_helper.rb, line 1114
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.to_s
if @options[:include_position]
field_name += "(#{ActionView::Helpers::DateTimeSelector::POSITION[type]}i)"
end
@options[:discard_type] ? prefix : "#{prefix}[#{field_name}]"
end