Rails Way for dynamic link_to I have a drop-down that users can choose what template they are about to receive. I'm pretty novice to Rails but I kind of go the logic Front-end = JavaScript and that's what I did, but this use of JavaScript seems like Rails should be able to handles it.

    &lt;div class="form-group"&gt;
        &lt;%= form_tag %&gt;
            &lt;%= select_tag :statement_type, options_for_select(Statement.statement_types.keys.to_a), :class =&gt; 'id_select', :id =&gt; 'secret_id'  %&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="modal-footer"&gt;
    &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Cancel&lt;/button&gt;
        &lt;%= link_to "New Form", new_statement_template_path(:statement_type =&gt; 'SoW'), :id =&gt; "secret_submit", method: :post %&gt;
  &lt;/div&gt;


The -only- purpose of the form_tag is because I couldn't get the link_to to successfully launch other-wise.

I make the link dynamic by using this function

$('#secret_id').on('change', function(){
    $('#secret_submit').attr('href', '/statements/new/statement_type='+ $('#secret_id').val());
});


I of course now have a pretty ugly URL, and in addition had to create a custom route, so I am wondering about the 'Rails Way' of doing this. Or at the least, making the URL prettier.
Your link_to is set to POST but you are adding the statement_type on the url like if it were a GET request? Sounds like you are mixing things and you can resolve this using just a single form element without JS if I understand you right.

&lt;%= form_tag new_statement_template_path, method: :post %&gt;
  &lt;div class="form-group"&gt;
    &lt;%= select_tag :statement_type, options_for_select(Statement.statement_types.keys.to_a) %&gt;
  &lt;/div&gt;
  &lt;div class="modal-footer"&gt;
    &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Cancel&lt;/button&gt;
    &lt;%= submit_tag "New Form" %&gt;
  &lt;/div&gt;
&lt;% end %&gt;


Now your controller action will have a the selected option at params[:statement_type].