2019-01-30 16:14:15 +01:00
|
|
|
class Champs::RepetitionController < ApplicationController
|
|
|
|
before_action :authenticate_logged_user!
|
|
|
|
|
|
|
|
def show
|
2021-10-27 16:27:17 +02:00
|
|
|
@champ = policy_scope(Champ).includes(:champs).find(params[:champ_id])
|
2019-01-30 16:14:15 +01:00
|
|
|
@position = params[:position]
|
2021-10-27 16:27:17 +02:00
|
|
|
@champ.add_row
|
2019-01-30 16:14:15 +01:00
|
|
|
|
|
|
|
if @champ.private?
|
|
|
|
@attribute = "dossier[champs_private_attributes][#{@position}][champs_attributes]"
|
|
|
|
else
|
|
|
|
@attribute = "dossier[champs_attributes][#{@position}][champs_attributes]"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|