Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/action_controller/parameters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ def each_element(object)
end

def multi_param_keys_for(filter)
keys.select { |key|
key.index("#{filter}(") == 0 && key.index(")") == key.length - 1
}
keys.select do |key|
key.start_with? "#{filter}(" and key.end_with? ')'
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i used and instead of && so i don't have to add parentheses around method parameters (it's cleaner without them)

end
end
end

Expand Down