refactor conditional finds to use named_scopes

also use updated_at in calendar feed
This commit is contained in:
Reinier Balt 2008-11-29 15:35:17 +01:00
parent 4a78b9f97a
commit 9147fb887c
10 changed files with 61 additions and 53 deletions

View file

@ -8,7 +8,7 @@ class StatsController < ApplicationController
@page_title = 'TRACKS::Statistics'
@unique_tags = @tags.count(:all, {:group=>"tag_id"})
@hidden_contexts = @contexts.find(:all, {:conditions => ["hide = ? ", true]})
@hidden_contexts = @contexts.hidden
@first_action = @actions.find(:first, :order => "created_at ASC")
get_stats_actions