Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/controllers/accounts/requests_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class Accounts::RequestsController < ApplicationController
before_filter do
before_action do
raise Pundit::NotAuthorizedError unless user_signed_in?
end

Expand Down
10 changes: 5 additions & 5 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ class ApplicationController < ActionController::Base

protect_from_forgery

before_filter :update_last_seen_at
before_filter :update_contest_checkin
before_filter :read_settings
before_filter :check_su_loss
before_filter :configure_permitted_parameters, if: :devise_controller?
before_action :update_last_seen_at
before_action :update_contest_checkin
before_action :read_settings
before_action :check_su_loss
before_action :configure_permitted_parameters, if: :devise_controller?

# helper ApplicationHelper
# helper ProblemsHelper
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/contest_relations_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class ContestRelationsController < ApplicationController
before_action :authenticate_user!
before_filter :find_contest_relation
before_action :find_contest_relation

def destroy
authorize @contest_relation, :destroy?
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/groups/problem_sets_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class Groups::ProblemSetsController < ApplicationController
layout "group"

before_filter do
before_action do
@group = Group.find(params[:group_id])
end

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/importers/problem_series_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class Importers::ProblemSeriesController < ApplicationController
before_filter do
before_action do
raise Pundit::NotAuthorizedError unless current_user.is_superadmin?
raise ActiveRecord::RecordNotFound if importer.nil?
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/problems/test_cases_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class Problems::TestCasesController < ApplicationController
layout "problem"

before_filter do
before_action do
@problem = Problem.find(params[:problem_id])
end

Expand Down