large refactor, ship a few columns from the user table into user_stats

This commit is contained in:
Sam
2013-10-04 13:28:49 +10:00
parent 4613006ae3
commit 5bf26ec34e
29 changed files with 354 additions and 251 deletions

View File

@ -9,13 +9,13 @@ describe UserVisit do
u.update_visit_record!(1.day.ago.to_date)
u.reload
u.days_visited.should == 2
u.user_stat.days_visited.should == 2
u.days_visited = 1
u.user_stat.days_visited = 1
u.save
UserVisit.ensure_consistency!
u.reload
u.days_visited.should == 2
u.user_stat.days_visited.should == 2
end
end