instance method
query
Ruby on Rails edge
Since edgeSignature
query(*path_or_actions, as: DEFAULT, to: nil, controller: nil, action: nil, on: nil, defaults: nil, constraints: nil, anchor: nil, format: nil, path: nil, internal: nil, **mapping, &block)
Define a route that only recognizes HTTP QUERY. QUERY is a safe and idempotent method for queries with a request body, defined in RFC 10008: The HTTP QUERY Method. For supported arguments, see match
query 'bacon', to: 'food#bacon'
Parameters
-
path_or_actionsrest -
askey = DEFAULT -
tokey = nil -
controllerkey = nil -
actionkey = nil -
onkey = nil -
defaultskey = nil -
constraintskey = nil -
anchorkey = nil -
formatkey = nil -
pathkey = nil -
internalkey = nil -
mappingkeyrest -
blockblock
Source
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 860
def query(*path_or_actions, as: DEFAULT, to: nil, controller: nil, action: nil, on: nil, defaults: nil, constraints: nil, anchor: nil, format: nil, path: nil, internal: nil, **mapping, &block)
match(*path_or_actions, as:, to:, controller:, action:, on:, defaults:, constraints:, anchor:, format:, path:, internal:, **mapping, via: :query, &block)
self
end
Defined in actionpack/lib/action_dispatch/routing/mapper.rb line 860
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Routing::Mapper::HttpHelpers