Sha256: 4a42d3e7e39c713914cf8331b053b510cd63bea3fbf0279f10ae4824c039f6c9
Contents?: true
Size: 1.56 KB
Versions: 1
Compression:
Stored size: 1.56 KB
Contents
# Make sure that ActiveScaffold has already been included ActiveScaffold rescue throw "should have included ActiveScaffold plug in first. Please make sure that this overwrite plugging comes alphabetically after the ActiveScaffold plug in" # Load our overrides require "active_scaffold_batch/config/core.rb" module ActiveScaffoldBatch def self.root File.dirname(__FILE__) + "/.." end end module ActiveScaffold module Actions ActiveScaffold.autoload_subdir('actions', self, File.dirname(__FILE__)) end module Config ActiveScaffold.autoload_subdir('config', self, File.dirname(__FILE__)) end module Helpers ActiveScaffold.autoload_subdir('helpers', self, File.dirname(__FILE__)) end end I18n.load_path += Dir[File.join(File.dirname(__FILE__), 'active_scaffold_batch', 'locale', '*.{rb,yml}')] ## ## Run the install assets script, too, just to make sure ## But at least rescue the action in production ## Rails::Application.initializer("active_scaffold_batch.install_assets", :after => "active_scaffold.install_assets") do begin ActionView::Base.class_eval do include ActiveScaffold::Helpers::UpdateColumnHelpers if ActiveScaffold.js_framework == :jquery include ActiveScaffold::Helpers::DatepickerUpdateColumnHelpers elsif ActiveScaffold.js_framework == :prototype include ActiveScaffold::Helpers::CalendarDateSelectUpdateColumnHelpers end include ActiveScaffold::Helpers::BatchCreateColumnHelpers end rescue raise $! unless Rails.env == 'production' end end if defined?(ACTIVE_SCAFFOLD_BATCH_GEM)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
active_scaffold_batch_vho-3.1.0 | lib/active_scaffold_batch.rb |