- @entries = DiaryEntry.find(:all, :include => :user,
- :conditions => {
- :users => { :status => ["active", "confirmed"] },
- :visible => true,
- :language_code => params[:language]
- },
- :order => 'created_at DESC',
- :limit => 20)
+ @entries = @entries.where(:users => { :status => ["active", "confirmed"] },
+ :visible => true,
+ :language_code => params[:language])