always make :via a list
This commit is contained in:
parent
6a3cbaca2e
commit
2c32e94b89
@ -213,12 +213,11 @@ def normalize_conditions!(path_params, path, ast)
|
||||
end
|
||||
@conditions[:required_defaults] = required_defaults
|
||||
|
||||
via = options[:via]
|
||||
via = Array(options[:via]).compact
|
||||
|
||||
if via == :all
|
||||
if via == [:all]
|
||||
options.delete(:via)
|
||||
else
|
||||
via = Array(via).compact
|
||||
if via.empty?
|
||||
msg = "You should not use the `match` method in your router without specifying an HTTP method.\n" \
|
||||
"If you want to expose your action to both GET and POST, add `via: [:get, :post]` option.\n" \
|
||||
|
Loading…
Reference in New Issue
Block a user