Module: Respect::Rails::ControllerHelper

Extended by:
ActiveSupport::Concern
Defined in:
lib/respect/rails/controller_helper.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary (collapse)

Instance Method Details

- (Object) action_schema(action = nil)

FIXME(Nicolas Despres): Test me!!!



41
42
43
44
45
46
47
# File 'lib/respect/rails/controller_helper.rb', line 41

def action_schema(action = nil)
  action ||= self.action_name
  method_name = "#{action}_schema"
  if self.respond_to?(method_name)
    send(method_name)
  end
end