Q:

ActiveRecord condition syntax question

Is there a better way of writing this?  Is it possible to do cleanly in one line?
conditions = ["category = ?", params[:category]] if params[:category]
@events = CalendarEvent.all( :conditions => conditions )

A:

Not really too much to consolidate but you don't have a lot going on so shouldn't matter.    
def action
    options = {:conditions => ['category=?', params[:category]]} if params[:category]
    @events = CalendarEvent.find(:all, options)
end

