mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 17:28:18 +02:00
Introduce BaseController for registrar area
This commit is contained in:
parent
955c7bcd6e
commit
92d8008c15
14 changed files with 785 additions and 746 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue