public Method

Route.matches_controller_and_action?(controller, action)

There's no documentation for this item.

Source Code

# File action_controller/routing/route.rb, line 211
def matches_controller_and_action?(controller, action)
  unless defined? @matching_prepared
    @controller_requirement = requirement_for(:controller)
    @action_requirement = requirement_for(:action)
    @matching_prepared = true
  end

  (@controller_requirement.nil? || @controller_requirement === controller) &&
  (@action_requirement.nil? || @action_requirement === action)
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.