You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/controllers/competitions/base_controller.rb

11 lines
278 B

class Competitions::BaseController < ApplicationController
include PaginateHelper
before_action :require_login
helper_method :current_competition
def current_competition
5 years ago
@_current_competition ||= Competition.find_by!(identifier: params[:competition_id])
end
end