mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Convert unless/else into if/else.
This commit is contained in:
parent
b127e0cac9
commit
bb47927d91
1 changed files with 4 additions and 4 deletions
|
@ -168,10 +168,7 @@ module ActionDispatch
|
|||
end
|
||||
|
||||
def build_named_route_call(records, inflection, options = {})
|
||||
unless records.is_a?(Array)
|
||||
record = extract_record(records)
|
||||
route = []
|
||||
else
|
||||
if records.is_a?(Array)
|
||||
record = records.pop
|
||||
route = records.map do |parent|
|
||||
if parent.is_a?(Symbol) || parent.is_a?(String)
|
||||
|
@ -180,6 +177,9 @@ module ActionDispatch
|
|||
ActiveModel::Naming.route_key(parent).singularize
|
||||
end
|
||||
end
|
||||
else
|
||||
record = extract_record(records)
|
||||
route = []
|
||||
end
|
||||
|
||||
if record.is_a?(Symbol) || record.is_a?(String)
|
||||
|
|
Loading…
Reference in a new issue