diff --git a/app/controllers/challenges_controller.rb b/app/controllers/challenges_controller.rb index 5fae970..90c116a 100644 --- a/app/controllers/challenges_controller.rb +++ b/app/controllers/challenges_controller.rb @@ -9,14 +9,6 @@ class ChallengesController < ApplicationController return_here end - def refresh - Challenge.past.pending.each do |c| - c.destroy - end - - render text: t(:challenges_cleared) - end - def new #No new challenges for now. raise AccessError @@ -69,6 +61,16 @@ class ChallengesController < ApplicationController render text: t(:challenges_cleared) end + # Custom method + + def refresh + Challenge.past.pending.each do |c| + c.destroy + end + + render text: t(:challenges_cleared) + end + private def get_challenge diff --git a/app/models/user.rb b/app/models/user.rb index 45a747a..b73772d 100755 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -296,7 +296,6 @@ class User < ActiveRecord::Base # FIXME: if team has been removed def validate_team if team and !active_teams.exists?({:id => team.id}) - byebug self.team = nil self.save! errors.add :team diff --git a/app/views/about/adminpanel.html.erb b/app/views/about/adminpanel.html.erb index 783df4d..997a4a5 100644 --- a/app/views/about/adminpanel.html.erb +++ b/app/views/about/adminpanel.html.erb @@ -20,6 +20,7 @@