Introduce BaseController for registrar area

This commit is contained in:
Artur Beljajev 2017-04-06 19:05:14 +03:00
parent 955c7bcd6e
commit 92d8008c15
14 changed files with 785 additions and 746 deletions

View file

@ -1,11 +1,13 @@
class Registrar::DashboardController < RegistrarController
authorize_resource class: false
class Registrar
class DashboardController < BaseController
authorize_resource class: false
def show
if can?(:show, :poll)
redirect_to registrar_poll_url and return
elsif can?(:show, Invoice)
redirect_to registrar_invoices_url and return
def show
if can?(:show, :poll)
redirect_to registrar_poll_url and return
elsif can?(:show, Invoice)
redirect_to registrar_invoices_url and return
end
end
end
end