I am making an app where user can print a doc in either PDF or JPG format, using wicked-pdf and imgkit respectively. I have two buttons, one for PDF and other JPG. Is it possible to have these buttons point to same action in controller which here is 'create'. my buttons are as-
<%= button_to "Print Bill[PDF]", :action => "create" %>
<%= button_to "Print Bill[JPG]", :action => "new" %>
can i make both the actions create? if yes, how so? How to catch which button is hit and render the respective view.