Module: Refinery::Application
- Defined in:
- lib/refinery/application.rb
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/refinery/application.rb', line 23 def included(base) self.instance_eval %( def self.method_missing(method_sym, *arguments, &block) #{base}.send(method_sym) end ) # JavaScript files you want as :defaults (application.js is always included). base.config.action_view.javascript_expansions[:defaults] = %w() # Configure the default encoding used in templates for Ruby 1.9. base.config.encoding = "utf-8" # Configure sensitive parameters which will be filtered from the log file. base.config.filter_parameters += [:password, :password_confirmation] # Specify a cache store to use base.config.cache_store = :file_store, File.join(Dir.tmpdir, base.name.to_s.gsub(':', '-')) # Include the refinery controllers and helpers dynamically base.config.to_prepare do ::Refinery::Application.refinery! end end |
.refinery! ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/refinery/application.rb', line 8 def refinery! ::ApplicationHelper.send :include, ::Refinery::ApplicationHelper [::ApplicationController, ::Admin::BaseController].each do |c| c.send :include, ::Refinery::ApplicationController c.send :helper, :application end ::Admin::BaseController.send :include, ::Refinery::Admin::BaseController ::Refinery.config.on_attach_procs.each do |proc| proc.call if proc.respond_to?(:call) end end |