Service: add index page

This commit is contained in:
simon lehericey 2018-04-19 16:15:44 +02:00
parent fc17b68dc1
commit 4d0a920e7a
3 changed files with 29 additions and 0 deletions

View file

@ -0,0 +1,13 @@
module NewAdministrateur
class ServicesController < AdministrateurController
def index
@services = services
end
private
def services
current_administrateur.services
end
end
end

View file

@ -0,0 +1,14 @@
.container
%h1 Liste des Services
%table.table
%thead
%tr
%th
nom
%tbody
- @services.each do |service|
%tr
%td
= service.nom

View file

@ -286,6 +286,8 @@ Rails.application.routes.draw do
get 'apercu'
end
end
resources :services, only: [:index]
end
apipie