mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
😢🔫 use an empty hash for magical speed.
For some reason, if the hash is empty, we choose "optimized" routes. I am not sure how or why optimized routes differ from regular routes. But, if we make sure the hash is empty, we get a nice speed improvement.
This commit is contained in:
parent
3d9bd2ac94
commit
547881594b
1 changed files with 5 additions and 1 deletions
|
@ -449,7 +449,11 @@ module ActionView
|
|||
method: method
|
||||
)
|
||||
|
||||
options[:url] ||= polymorphic_path(record, format: options.delete(:format))
|
||||
options[:url] ||= if options.key?(:format)
|
||||
polymorphic_path(record, format: options.delete(:format))
|
||||
else
|
||||
polymorphic_path(record, {})
|
||||
end
|
||||
end
|
||||
private :apply_form_for_options!
|
||||
|
||||
|
|
Loading…
Reference in a new issue