- Where Developers Learn, Share, & Build Careers
I'm running into issues trying to isolate a scene partially. I want to use the same form for the new and edit the scenes. Both of these are on the same page The new model is at the top of the form page and uses a variable that I set in the controller.
& lt;% = form_for @new_hire do | F | & Gt%; & Lt;% = Render: Partial = & gt; 'New_hire_requests / form',: local = & gt; {: F = & gt; F}%> & Lt;% end% & gt; Then I am partial for pending approval which is provided by any other partial
and pending approval partial within me
& Lt;% end% & gt; This is an error throwing
undefined method # & lt; new_hire_request_path '; # & Lt; Class: 0x0000010488ac98 & gt ;: 0x0000010223ffc0 & gt; Is there a way to use form code for both a new and editing form on the same page?
Controlling logic
@new_share = newhearquest.new @ nuveer_request = current_user.New_shire_requests @ pending_ approval = @ new_hire_requests.select {| P | P.status == 'Pending_Arg_Aprival' || P.status == 'pending_exec_approval'} partial code
& lt;% = render 'shared / error_messages', object: f.object% & Gt; & Lt; Fieldet class = "first" & gt; & Lt;% = f.label: First_name, "First Name"% & gt; & Lt;% = f.text_field: first_name% & gt; & Lt; / Fieldset & gt; & Lt; Fieldset & gt; & Lt;% = f.label: last_name, "last name"%> & Lt;% = f.text_field: last_name% & gt; & Lt; / Fieldset & gt; & Lt;% = f.submit "Submit for acceptance
Add new_hire_requests resources to routes and get along with it.
Comments
Post a Comment