Commit 66a02688 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Modified GLoc helpers to ensure compatibility with rails 1.2

git-svn-id: http://redmine.rubyforge.org/svn/trunk@173 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 681bbf02
......@@ -115,7 +115,20 @@ module ActionView #:nodoc:
select_html(options[:field_name] || 'year', year_options, options[:prefix], options[:include_blank], options[:discard_type], options[:disabled])
end
# added by JP Lang
# select_html is a rails private method and changed in 1.2
# implementation added here for compatibility
def select_html(type, options, prefix = nil, include_blank = false, discard_type = false, disabled = false)
select_html = %(<select name="#{prefix || "date"})
select_html << "[#{type}]" unless discard_type
select_html << %(")
select_html << %( disabled="disabled") if disabled
select_html << %(>\n)
select_html << %(<option value=""></option>\n) if include_blank
select_html << options.to_s
select_html << "</select>\n"
end
end
# The private method <tt>add_options</tt> is overridden so that "Please select" is localized.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment