> @albums=Album.find(:all, :conditions => [:artist_id => > params[:find_id]])
Good practice for it to read like this @albums = Album.find(:all, :conditions => "where artist_id = '#{params [:find_id}'") On May 23, 12:34 pm, Mk 27 <rails-mailing-l...@andreas-s.net> wrote: > Okay, I got the WEBbrick output to agree with me. Here's the line in > the controller now, which is still wrong: > > @albums=Album.find(:all, :conditions => [:artist_id => > params[:find_id]]) > > NoMethodError in MainController#list_albums > undefined method `%' for {:artist_id=>"67"}:Hash > > -- > Posted viahttp://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 -~----------~----~----~----~------~----~------~--~---