blob: cbea402c3f1e0d851e1b7cd9e3eafa92e82ac8b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
class TartiflettesController < ApplicationController
before_action :set_tartiflette, only: [ :show ]
def index
@tartiflettes = Tartiflette.all
end
def show
end
def new
@tartiflette = Tartiflette.new
end
private
def tartiflette_params
params.require(:tartiflette)
end
def set_tartiflette
@tartiflette = Tartiflette.find(params[:id])
rescue ActiveRecord::RecordNotFound
redirect_to root_path, alert: "Tartiflette introuvable."
end
end
|