Eiji SakaiのDateHelperJaは2.3系までの対応なので少々変更する。変更点は以下のとおりなんだけど後方互換性はありません。
diff -ru date_helper_ja/init.rb sites/dairymen/vendor/plugins/date_helper_ja/init.rb
--- date_helper_ja/init.rb 2011-10-30 05:30:30.166390071 -0700
+++ sites/dairymen/vendor/plugins/date_helper_ja/init.rb 2011-10-30 02:53:27.299188351 -0700
@@ -8,11 +8,7 @@
# http://d.hatena.ne.jp/elm200/
#
-PLUGIN_NAME = 'date_helper_ja_' + RAILS_GEM_VERSION.gsub(/\./, '_')
+PLUGIN_NAME = 'date_helper_ja'
PLUGIN_PATH = File.dirname(__FILE__) + "/lib/" + PLUGIN_NAME + ".rb"
-if FileTest.exist?(PLUGIN_PATH)
- require_dependency PLUGIN_NAME if defined? ActionView::Base
-else
- require_dependency 'date_helper_ja' if defined? ActionView::Base
-end
+require_dependency PLUGIN_NAME if defined? ActionView::Base
diff -ru date_helper_ja/lib/date_helper_ja.rb sites/dairymen/vendor/plugins/date_helper_ja/lib/date_helper_ja.rb
--- date_helper_ja/lib/date_helper_ja.rb 2011-10-30 05:30:30.166390071 -0700
+++ sites/dairymen/vendor/plugins/date_helper_ja/lib/date_helper_ja.rb 2011-10-30 04:18:25.542811350 -0700
@@ -105,9 +105,10 @@
select_html = "\n"
select_html << content_tag(:option, '', :value => '') + "\n" if @options[:include_blank]
- select_html << select_options_as_html.to_s
+ select_html << prompt_option_tag(type, @options[:prompt]) + "\n" if @options[:prompt]
+ select_html << select_options_as_html
- content_tag(:select, select_html, select_options) + time_unit(type).to_s + "\n"
+ (content_tag(:select, select_html.html_safe, select_options) + time_unit(type) + "\n").html_safe
end
alias_method_chain :build_select, :jp_time_unit