Hello there, I have a little problem with the find, I want to put some conditions depend on the users want. #Language if params[:l].to_i > 0 find_options[:conditions] = ["language_id = ?", params[:l]] end #Category if params[:c].to_i > 0 find_options[:conditions] = ["category_id = ?", params[:c]] end @videos = VideoBrowse.find(:all, :conditions => find_options[:conditions] , :include => [:category, :language, :user]) Is there a better way to do it then this? and thanks for help :D -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---