Module: DynamicController::ClassMethods

Defined in:
lib/dynamic_controller/class_methods.rb

Instance Method Summary collapse

Instance Method Details

#include_action?(action_name) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/dynamic_controller/class_methods.rb', line 8

def include_action?(action_name)
  (@resource_options[:only] - @resource_options[:except]).include?(action_name)
end

#parent_resourcesObject



4
5
6
# File 'lib/dynamic_controller/class_methods.rb', line 4

def parent_resources
  @parent_resources ||= []
end

#redefined_responder_to(action, format = nil) ⇒ Object



16
17
18
# File 'lib/dynamic_controller/class_methods.rb', line 16

def redefined_responder_to(action, format=nil)
  redefined_responders[redefined_responder_key(action, format)]
end

#redefined_responder_to?(action, format = nil) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/dynamic_controller/class_methods.rb', line 20

def redefined_responder_to?(action, format=nil)
  redefined_responders.has_key? redefined_responder_key(action, format)
end

#redefined_respondersObject



12
13
14
# File 'lib/dynamic_controller/class_methods.rb', line 12

def redefined_responders
  @redefined_responders ||= {}
end

#responder_formatsObject



24
25
26
# File 'lib/dynamic_controller/class_methods.rb', line 24

def responder_formats
  @responder_formats ||= [:html, :json]
end