What is the best way to override form_for
?
For example, in every form_for(@post)
,
I would like to automatically set the <form>
id attribute to @post.object_id
,
and add the following field: hidden_field_tag :form_id, @post.object_id
Can I do this using alias_method_chain
?