Class: ActionController::Routing::Optimisation::PositionalArgumentsWithAdditionalParams

Inherits:
Object
  • Object
show all
Defined in:
lib/subdomain_fu/url_rewriter.rb

Instance Method Summary collapse

Instance Method Details

#guard_condition_with_subdomainsObject



36
37
38
39
40
41
# File 'lib/subdomain_fu/url_rewriter.rb', line 36

def guard_condition_with_subdomains
  # don't allow optimisation if a subdomain is present - fixes a problem
  # with the subdomain appearing in the query instead of being rewritten
  # see http://mbleigh.lighthouseapp.com/projects/13148/tickets/8-improper-generated-urls-with-named-routes-for-a-singular-resource
  guard_condition_without_subdomains + " && !args.last.has_key?(:subdomain)"
end