I have a form rendered in the new and edit views:
<%= simple_form_for(@course, html: {class: "form-horizontal"}) do |f| %>
Since my edit form should be slightly different: simple_form_for([@category, @course])
, is there a way to write a conditional based on the controller action (edit or new) ?
# if controller action is new
<%= simple_form_for(@course, html: {class: "form-horizontal"}) do |f| %>
#if controller action is edit
<%= simple_form_for([@category, @course], html: {class: "form-horizontal"}) do |f| %>