Displaying 1 result from an estimated 1 matches for "next_painting_id".
2006 Feb 17
1
validate() with has_many association
...ce to save and redisplay the screen
# Or save and go to the next Painting
if params[:commit] == ''Save''
redirect_to :action => ''edit'', :id => @params[:id]
else
redirect_to :action => ''edit'', :id => @next_painting_id
end
else
#there was a problem updating the record
@heading = "Painting Editor"
render :action => ''edit'', :id => @params[:id]
end
end
painting model
has_many :images
def thumbnail=(uploaded_image)
# form has a file upload field...