Module: TemplatesFor::ActionController

Defined in:
lib/templates_for/action_controller.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



13
14
15
16
# File 'lib/templates_for/action_controller.rb', line 13

def self.included(base)
  base.send :extend, ClassMethods
  base.append_view_path "app/templates"
end

Instance Method Details

#templates_for_actionObject



18
19
20
# File 'lib/templates_for/action_controller.rb', line 18

def templates_for_action
  self.class.action_templates[action_name.to_sym] || []
end