I was converting a link_to to a button_to when I noticed that the date-type = json option did not work correctly. After some googling I discovered that somebody has a patch for it on github just last month:
https://github.com/rails/rails/pull/3156
It was merged into rails:master 3 weeks ago, and appears to be in tag 3.1.1.
But my project is currently on 3.0.8 and I’m not sure I’m ready to make the leap just yet due to the unfamiliar asset pipeline business.
What are some options for getting the patch that I want?
I see two options:
button_towith the patched version. You can then upgrade to 3.0.10 and it will keep working. Remove the initializer when upgrading to 3.1.1 and your code does not have to change.ApplicationHelper–or any other helper, you can place this method, call itmy_own_button_toand then you can use it in your views.Hope this helps.