Find dynamic conditions?

Hello there,

I have a little problem with the find, I want to put some conditions
depend on the users want.

if params[:l].to_i > 0
find_options[:conditions] = [“language_id = ?”, params[:l]]

if params[:c].to_i > 0
find_options[:conditions] = [“category_id = ?”, params[:c]]

@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 :smiley: