Topic: How to add new methods to the form_helper class?
I tried to figure out how to add new methods to the form_helper class.
In my case, an attrubite had 3 possible values.
I want to add a method that create 3 radio buttons.
Finally I want to be able to use this in my erb file:
<% form_for(@modelname) do |f| %> ... <%= f.a_b_or_c :fieldname %> ... <% end %>
Where do I create the file, where do I define the method, and how can I access the property and value in the form?
A good example that is easy to understand would help a lot.
Last edited by JavaBar (2011-05-11 06:15:36)