ruby on rails - Wizard nested form using wicked -


i have nested form in wizard. how can perform update action both table gets updated @ same time. form is:

<%= form_for(@web, url: wizard_path, :method => :put, html: {:class=>"form-horizontal, left"}) |f| %>   <%= fields_for resource.role |rf| %>     <%= rf.text_field :fname, :class=>"span5", type: "text", placeholder: "first name", required: "" %>     </div>     </div>     <%= rf.text_field :lname, :class=>"span5", type: "text", placeholder: "last name", required: "" %>     <% end %> <% end %> 

where have resource.role = "user".

my models web , user.

i tried doing web table gets updated:

class userstepscontroller < applicationcontroller include wicked::wizard steps :personal, :organization  def show     @web = current_web     render_wizard end  def update     @web = current_web     @web.attributes = params[:web]     render_wizard @web end end 

please help


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -