Add public scoreboard slug & URL
This commit is contained in:
@@ -69,6 +69,6 @@ class ContestsController < ApplicationController
|
||||
end
|
||||
|
||||
def contest_params
|
||||
params.expect(contest: [ :name, :team, :allow_registration ])
|
||||
params.expect(contest: [ :name, :team, :allow_registration, :slug ])
|
||||
end
|
||||
end
|
||||
|
@@ -1,13 +1,12 @@
|
||||
class SessionsController < ApplicationController
|
||||
allow_unauthenticated_access only: %i[ new create ]
|
||||
rate_limit to: 10, within: 3.minutes, only: :create, with: -> { redirect_to new_session_url, alert: "Try again later." }
|
||||
before_action :skip_authorization
|
||||
|
||||
def new
|
||||
skip_authorization
|
||||
end
|
||||
|
||||
def create
|
||||
skip_authorization
|
||||
if user = User.authenticate_by(params.permit(:email_address, :password))
|
||||
start_new_session_for user
|
||||
redirect_to after_authentication_url
|
||||
|
Reference in New Issue
Block a user