This method is deprecated or moved on the latest stable version.
The last existing version (v2.1.0) is shown here.
write_recognition()
public
Write and compile a recognize
method for this Route.
# File actionpack/lib/action_controller/routing/route.rb, line 79
def write_recognition
# Create an if structure to extract the params from a match if it occurs.
body = "params = parameter_shell.dup\n#{recognition_extraction * "\n"}\nparams"
body = "if #{recognition_conditions.join(" && ")}\n#{body}\nend"
# Build the method declaration and compile it
method_decl = "def recognize(path, env={})\n#{body}\nend"
instance_eval method_decl, "generated code (#{__FILE__}:#{__LINE__})"
method_decl
end