Sha256: 6b3b110642a77d496b2eae0d324881d37d49523cbafc9e9211b47fc5fa089b03
Contents?: true
Size: 970 Bytes
Versions: 6
Compression:
Stored size: 970 Bytes
Contents
# Include hook code here require 'ckeditor' require 'ckeditor_version' require 'ckeditor_file_utils' CkeditorFileUtils.check_and_install # make plugin controller available to app config.load_paths += %W(#{Ckeditor::PLUGIN_CONTROLLER_PATH} #{Ckeditor::PLUGIN_HELPER_PATH}) Rails::Initializer.run(:set_load_path, config) ActionView::Base.send(:include, Ckeditor::Helper) # require the controller require 'ckeditor_controller' class ActionController::Routing::RouteSet unless (instance_methods.include?('draw_with_ckeditor')) class_eval <<-"end_eval", __FILE__, __LINE__ alias draw_without_ckeditor draw def draw_with_ckeditor draw_without_ckeditor do |map| map.connect 'ckeditor/command', :controller => 'ckeditor', :action => 'command' map.connect 'ckeditor/upload', :controller => 'ckeditor', :action => 'upload' yield map end end alias draw draw_with_ckeditor end_eval end end
Version data entries
6 entries across 6 versions & 1 rubygems