Sha256: b7695588354433d5f30c7c43283e16ef0d98077b034cf7418bf1da48c8425e3d

Contents?: true

Size: 957 Bytes

Versions: 1

Compression:

Stored size: 957 Bytes

Contents

%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
# FIXME - should check each file or maybe a gem config option to overwrite each startup
unless File.exists?(RAILS_ROOT + '/public/javascripts/calendar_date_select/calendar_date_select.js')
  ['/public',
   '/public/javascripts/calendar_date_select',
   '/public/javascripts/calendar_date_select/locale',
   '/public/stylesheets/calendar_date_select',
   '/public/images/calendar_date_select'].each do |dir|
    source = File.join(File.dirname(__FILE__),dir)
    dest = RAILS_ROOT + dir
    FileUtils.mkdir_p(dest)
    FileUtils.cp(Dir.glob(source+'/*.*'), dest, :verbose => true)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gbdev-calendar_date_select-1.11.20080826 init.rb