Class: ActionView::TestCase

Inherits:
Object
  • Object
show all
Defined in:
lib/lazy_named_routes_helpers/routing_monkey_patches_rails_3_0.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(selector, *args, &block) ⇒ Object



138
139
140
141
142
143
144
# File 'lib/lazy_named_routes_helpers/routing_monkey_patches_rails_3_0.rb', line 138

def method_missing(selector, *args, &block)
  if @controller.respond_to?(:_routes) && @controller._routes.named_routes.helper_method?(selector)
    @controller.__send__(selector, *args, &block)
  else
    super
  end
end