[Rails] Re: Rails 3- Handling a conditional Create in a Controller
@photo = current_user.photos.create(params[:photo])
Keep :project_id in params[:photo]. Use hidden field on form that
submits the data or regular select tag if you let the use choose the
project.
What makes you think that it won't work ? There is no special case
here.
Robert Pankowecki
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home