make requestinvite controller method explicit

This commit is contained in:
Devin Howard 2016-09-26 01:04:58 +08:00
parent c1acaba941
commit 9699b41159
2 changed files with 15 additions and 1 deletions

View file

@ -1,11 +1,11 @@
# frozen_string_literal: true
class MainController < ApplicationController
before_action :authorize_main
after_action :verify_authorized
after_action :verify_policy_scoped, only: [:home]
# GET /
def home
authorize :Main
respond_to do |format|
format.html do
if !authenticated?
@ -17,4 +17,14 @@ class MainController < ApplicationController
end
end
end
# GET /request
def requestinvite
end
private
def authorize_main
authorize :Main
end
end

View file

@ -3,4 +3,8 @@ class MainPolicy < ApplicationPolicy
def home?
true
end
def requestinvite?
true
end
end