Module: Rtml::Controller::ClassMethods::RtmlActionHelpers

Defined in:
lib/rtml/controller/class_methods/rtml_action_helpers.rb

Overview

Extended by RtmlController, this module provides class methods to assist adding new RTML actions to the controller.

Instance Method Summary collapse

Instance Method Details

#add_rtml_proxy_action(method_name) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/rtml/controller/class_methods/rtml_action_helpers.rb', line 3

def add_rtml_proxy_action(method_name)
  if defined?(Rails) && Rails.logger
    Rails.logger.debug "Adding RTML proxy action #{method_name.inspect} to #{name}"
  end

  define_method method_name do
    render :rtml => method_name unless default_template_exists?
  end

  recalculate_action_methods!
end

#recalculate_action_methods!Object



15
16
17
# File 'lib/rtml/controller/class_methods/rtml_action_helpers.rb', line 15

def recalculate_action_methods!
  @action_methods = nil
end