Permalink
Browse files

removing name "hack" from show_group_calendar

Signed-off-by: rick <technoweenie@gmail.com>
  • Loading branch information...
1 parent 47d3995 commit 485339c8fa9001dd2fa00b4085dbedac73bb9a82 Jeffrey Chupp committed with technoweenie Apr 20, 2009
Showing with 3 additions and 4 deletions.
  1. +3 −4 seinfeld_calendar.rb
View
@@ -86,12 +86,12 @@ def page_title
"%s's Calendar" % @user.login
end
- def get_user_and_progressions(extra = 0)
+ def get_user_and_progressions(extra = 0, name = params[:name])
[:year, :month].each do |key|
value = params[key].to_i
params[key] = value.zero? ? Date.today.send(key) : value
end
- if @user = Seinfeld::User.first(:login => params[:name])
+ if @user = Seinfeld::User.first(:login => name)
Time.zone = @user.time_zone || "UTC"
progressions = @user.progress_for(params[:year], params[:month], extra)
end
@@ -113,8 +113,7 @@ def show_group_calendar
@progressions = Set.new
@users = params[:names].split(',')
@users.each do |name|
- params[:name] = name # hack
- @progressions.merge get_user_and_progressions(6)
+ @progressions.merge get_user_and_progressions(6, name)
end
haml :group
end

0 comments on commit 485339c

Please sign in to comment.