Take Hash with options inside Array in #url_for#9599
Conversation
|
cc @drogus |
|
Needs tests and a changelog entry. |
|
great patch 👍 looking forward to it! |
|
/cc @bjoernbur |
|
thanks for this patch... |
|
I'm done with tests and a changelog entry. |
There was a problem hiding this comment.
Please use 1.9 style hash.
|
Done. |
|
+1 for the behaviour, but why |
|
@egilburg there are a lot of Look, polymorphic helpers already have this functionality, you can path url options as the second param (as I do with You can use it like I hope I've cleared this. |
|
@egilburg doing it in @josevalim are you still 👎 on this behavior ? |
|
@josevalim ping |
|
@senny ping |
|
@ognevsky we need to wait for @josevalim to jump in. |
|
@senny ok, let's wait. |
|
The issue here is what is going to be considered the form object in form_for if the last element is a hash. Can a hash be a form object today? If so, how this patch affect |
|
@ognevsky if you can add tests for |
|
@josevalim @pixeltrix sorry for the long wait. Jose, this patch doesn't affect to So, I don't change |
|
@josevalim @pixeltrix I've rebased and updated this request. |
|
@ognevsky Looks like there's failure https://travis-ci.org/rails/rails/jobs/13876911#L3127 |
|
@chancancode oops, I'll fix it in the morning |
|
Fixed. I've added this failing spec to the commit accidentally, it should never pass (because |
|
@ognevsky can you add a CHANGELOG entry and squash your commits - then I'll merge it. |
|
@pixeltrix I'm ready |
Take Hash with options inside Array in #url_for
|
@ognevsky thanks! |
|
You da man! |
Allows you to code like this: