search for: blog_user_id

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

2006 Feb 23
7
How to set a relationship with a value from a selection list
...ontroller I''m trying to set the relationship when the photo is saved in a method called ''create'' def create @photo = Photo.new(params[:photo]) @photo_file = PhotoFile.new(params[:photo_file]) @photo.photo_file = @photo_file @photo.album = @post.album_id @photo.blog_user_id = 1 if @photo.save! flash[:notice] = ''Photo was successfully created.'' redirect_to :action => ''list'' else render :action => ''new'' end end When I click save I get the following error... NoMethodError in Photo#create You...