demarches-normaliennes/app/controllers/administrations_controller.rb
2018-01-17 18:04:21 +01:00

21 lines
501 B
Ruby

class AdministrationsController < ApplicationController
include SmartListing::Helper::ControllerExtensions
helper SmartListing::Helper
before_action :authenticate_administration!
def index
@admin = Administrateur.new
@admins = smart_listing_create :admins,
Administrateur.all.order(:email),
partial: "administrations/list",
array: true
end
def update
Administrateur.find_inactive_by_id(params[:id]).invite!
redirect_to administrations_path
end
end