Displaying 1 result from an estimated 1 matches for "dlg114".
Did you mean:
d22114
2011 Sep 01
0
do you think it's the best solution?
...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 this way if the document is not valid I can''t see document fields
because it isn''t a new record and @document is not defined.
Can you suggest a better way to do this?
--
You received this message because you are subscribed to the Google Groups "Ruby on Ra...