summaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-01-24 18:15:27 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-01-24 18:15:27 +0000
commit66a02688adcf0c076d2ba47ffbdf424994202575 (patch)
tree37e4eb315b3c3833d306c26979a66858eac31d69 /vendor
parent681bbf02ae4085ed2b161c88f93e4d0dc232dfe6 (diff)
downloadredmine-66a02688adcf0c076d2ba47ffbdf424994202575.tar.gz
redmine-66a02688adcf0c076d2ba47ffbdf424994202575.zip
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
Diffstat (limited to 'vendor')
-rw-r--r--vendor/plugins/gloc-1.1.0/lib/gloc-rails-text.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/vendor/plugins/gloc-1.1.0/lib/gloc-rails-text.rb b/vendor/plugins/gloc-1.1.0/lib/gloc-rails-text.rb
index abbb7a190..f437410dc 100644
--- a/vendor/plugins/gloc-1.1.0/lib/gloc-rails-text.rb
+++ b/vendor/plugins/gloc-1.1.0/lib/gloc-rails-text.rb
@@ -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.