Module: Refinery::Application
- Defined in:
- lib/refinery/application.rb
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/refinery/application.rb', line 25 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 = :memory_store # Include the refinery controllers and helpers dynamically base.config.to_prepare do ::Refinery::Application.refinery! end end |
.refinery! ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/refinery/application.rb', line 6 def refinery! ::Refinery.config.before_inclusion_procs.each do |proc| proc.call if proc.respond_to?(:call) end ::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.after_inclusion_procs.each do |proc| proc.call if proc.respond_to?(:call) end end |