internetee-registry/app/controllers/registrar/bulk_change_controller.rb
Artur Beljajev 9684c8e59f Refactor Devise integration
- Use scoped users
- Use the named route helpers instead of hardcoded paths
2018-06-20 12:21:22 +03:00

20 lines
431 B
Ruby

class Registrar
class BulkChangeController < DeppController
helper_method :available_contacts
def new
authorize! :manage, :repp
render file: 'registrar/bulk_change/new', locals: { active_tab: default_tab }
end
private
def available_contacts
current_registrar_user.registrar.contacts.order(:name).pluck(:name, :code)
end
def default_tab
:technical_contact
end
end
end