Hi,
I'm in the process of upgrading an app from Rails 2.3 to 3.2. In order to get the plugin working correctly I had to do the following:
Add calendar date select to the Gemfile:
gem 'calendar_date_select', '2.0.0',
:git => 'git://github.com/timcharper/calendar_date_select.git'
Add the following to my layout/application (for silver style):
<%= stylesheet_link_tag 'calendar_date_select/silver' %>
<%= javascript_include_tag 'calendar_date_select/calendar_date_select' %>
Add the css and js assets to the asset pipeline in config/application.rb:
config.assets.precompile += ['calendar_date_select/*.css', 'calendar_date_select/*.js']
Create the file config/initializers/calendar_date_select.rb with the following:
require 'calendar_date_select'
ActionView::Helpers::FormHelper.send(:include, CalendarDateSelect::FormHelpers)
ActionView::Base.send(:include, CalendarDateSelect::FormHelpers)
ActionView::Base.send(:include, CalendarDateSelect::IncludesHelper)
Without the config/initializer/calendar_date_select.rb file, the calendar_date_select helper method is no longer available in the views:
undefined method `calendar_date_select'
So my question is... is a config/initializer file required? Is there a better way to get the helpers loaded in the ActionView context?
Thanks,
Jeff