is there a way to use simple_form in show.html.erb
-
29-10-2019 - |
Question
I've spent considerable amount of time making a form in simple_form. It had 96 fields! I've split the form in different steps. Each step is made as a partial.
Now I have to prepare the form for show.html.erb
. I thought rendering the same partials would just show the form to the user but ofcourse If I try to do that it gives me an error like:
undefined local variable or method `f' for #<#<Class:0xb6d8712c>:0xb6d85f20>
Most of my partials have code like below:
<%= f.input :name, :label=>"Preferred Name",:label_html => {:class => "form_label"}%>
I am just trying to leverage the work I've done instead of coding all fields again for show.html.erb
Are there any tricks I can use here?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow