Hi I’m looking to query a Post model based on two attributes. - the current user’s id - a “1” in an integer attribute that I have created
I hope to show the title each one of this persons posts that have a 1 in the integer attribute This is what I am thinking of having Posts Controller (I need help here, below is what I was thinking) def selectview @posts = Post.find( :user_id == session[:user_id], :intatt == 1) End Posts view <%= @posts.each do |post| %> <%= post.title %> <% end %> I am most concerned about how to code the controller, any help would be appreciated. -- Posted via http://www.ruby-forum.com/. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.