master
<%= form_for (params[:shift_id] ? [:shift, :report, @report_item] : [:report, @report_item]) do |f| %> <%= f.error_messages %> <p> <%= f.label :content %><br /> <%= f.text_area :content %> </p> <p><%= f.submit "Submit" %></p> <% end %>