-
-
Save heidmotron/99318 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Existing | |
action = url_for(:action => options[:action], :id => record) | |
# action should be the result of url_for which would be a string | |
# then it gets shoved into a hash where url_for will get called once again | |
contents = form_tag({:action => action}, :method =>(options[:method] || 'post'), :enctype => options[:multipart] ? 'multipart/form-data': nil) | |
# The patch | |
action = {:action => options[:action], :id => record} | |
# Let url_for handle it in the form_tag method | |
contents = form_tag(action, :method =>(options[:method] || 'post'), :enctype => options[:multipart] ? 'multipart/form-data': nil) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment