Permalink
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (15 sloc) 835 Bytes
%w[calendar_date_select includes_helper].each { |file|
require File.join( File.dirname(__FILE__), "lib",file)
}
ActionView::Helpers::FormHelper.send(:include, CalendarDateSelect::FormHelper)
ActionView::Base.send(:include, CalendarDateSelect::FormHelper)
ActionView::Base.send(:include, CalendarDateSelect::IncludesHelper)
# install files
unless File.exists?(RAILS_ROOT + '/public/javascripts/calendar_date_select/calendar_date_select.js')
['/public', '/public/javascripts/calendar_date_select', '/public/stylesheets/calendar_date_select', '/public/images/calendar_date_select', '/public/javascripts/calendar_date_select/locale'].each do |dir|
source = File.join(File.dirname(__FILE__), dir)
dest = RAILS_ROOT + dir
FileUtils.mkdir_p(dest)
FileUtils.cp(Dir.glob(source+'/*.*'), dest)
end
end