My view:
<div class = "btn btn-link">
<%= link_to 'Generate Rating Set', {
:controller => "co_view_rating",
:action => "generate_rating_set_co_view" } %>
</div>
This links to a action in my controller which creates a new record. How can I pass a variable via this method in my view to the action in my controller. The variable would be user input via a text field.
You should send your variable through a form with the
POSTmethod.And in your controller action :
you can find more documentation on form_tags and input types here : http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html