aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/referentials_controller.rb
diff options
context:
space:
mode:
authorcedricnjanga2018-01-30 06:37:52 -0800
committercedricnjanga2018-01-30 06:37:52 -0800
commit7ec19d8dc153e1491cb1a693b11b3b0a351f316c (patch)
tree6da6a8bbcf1ae789a460fece5cf7e961562c5222 /app/controllers/referentials_controller.rb
parentf32d869cc3f34a939764cc3fa4d612a5d6544d08 (diff)
parent617a54cf63d7f11111b168534d49cdc04a5865d4 (diff)
downloadchouette-core-7ec19d8dc153e1491cb1a693b11b3b0a351f316c.tar.bz2
Merge branch 'master' into 5683-add_workgroup_id_to_calendars
Diffstat (limited to 'app/controllers/referentials_controller.rb')
-rw-r--r--app/controllers/referentials_controller.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/referentials_controller.rb b/app/controllers/referentials_controller.rb
index 436d5ccb5..0ed3f75dd 100644
--- a/app/controllers/referentials_controller.rb
+++ b/app/controllers/referentials_controller.rb
@@ -32,9 +32,8 @@ class ReferentialsController < ChouetteController
show! do |format|
@referential = @referential.decorate(context: { current_workbench_id: params[:current_workbench_id] } )
@reflines = lines_collection.paginate(page: params[:page], per_page: 10)
- @reflines = ModelDecorator.decorate(
+ @reflines = ReferentialLineDecorator.decorate(
@reflines,
- with: ReferentialLineDecorator,
context: {
referential: referential,
current_organisation: current_organisation
@@ -80,6 +79,7 @@ class ReferentialsController < ChouetteController
referential.archive!
redirect_to workbench_path(referential.workbench_id), notice: t('notice.referential.archived')
end
+
def unarchive
if referential.unarchive!
flash[:notice] = t('notice.referential.unarchived')
@@ -97,7 +97,7 @@ class ReferentialsController < ChouetteController
helper_method :current_referential
def resource
- @referential ||= current_organisation.find_referential(params[:id])
+ @referential ||= current_organisation.find_referential(params[:id]).decorate
end
def collection