diff options
Diffstat (limited to 'app/controllers/referentials_controller.rb')
| -rw-r--r-- | app/controllers/referentials_controller.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/referentials_controller.rb b/app/controllers/referentials_controller.rb index face0663f..6ee744413 100644 --- a/app/controllers/referentials_controller.rb +++ b/app/controllers/referentials_controller.rb @@ -6,5 +6,12 @@ class ReferentialsController < InheritedResources::Base show! end + protected + def resource + @referential ||= current_organisation.referentials.find_by_id(params[:id]) + end + def collection + @referentials ||= current_organisation.referentials + end end |
