search for: shop_controller

Displaying 1 result from an estimated 1 matches for "shop_controller".

Did you mean: crop_controller
2011 Sep 01
0
do you think it's the best solution?
...fields_form'', :locals => { :f => shop_f } if @shop.new_record? or @document = field_set_tag t(''shop'') do .inputs = shop_f.input :name ............. I want to create a new document only if I''m inserting a new shop record or if @document is defined. Shop_controller e'': def new @shop = Shop.new @document = @shop.documents.build new! end In questo modo quando creo un nuovo Shop creo anche un nuovo Document relativo, poi... def edit @shop = Shop.find(params[:id]) @document = @shop.documents.build if params[:dlg114] edit! end But t...