Class

ActionController::Routing::Optimisation::PositionalArgumentsWithAdditionalParams

Inheritance
< ActionController::Routing::Optimisation::PositionalArguments < ActionController::Routing::Optimisation::Optimiser < Object

This case is mostly the same as the positional arguments case above, but it supports additional query parameters as the last argument

Methods

Instance

Visibility Signature
public applicable? ()
public generation_code ()
public guard_conditions ()

Instance Method Detail

applicable?()

To avoid generating "localhost/?host=foo.example.com" we can‘t use this optimisation on routes without any segments

generation_code()

This case uses almost the same code as positional arguments, but add a question mark and args.last.to_query on the end, unless the last arg is empty

guard_conditions()