aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorMichel Etienne2012-09-03 16:38:08 +0200
committerMichel Etienne2012-09-03 16:38:08 +0200
commitdf33fee5452c94eaf55ead124fb0ed2cb6690ef6 (patch)
tree28cb14c806e157b3475dda1f91808a81e069686a /app/controllers
parent8947fae26d69b4380075a1f82376174fa81cb695 (diff)
downloadchouette-core-df33fee5452c94eaf55ead124fb0ed2cb6690ef6.tar.bz2
organisation mandatory for referentials
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/referentials_controller.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/referentials_controller.rb b/app/controllers/referentials_controller.rb
index 6ee744413..8881c5127 100644
--- a/app/controllers/referentials_controller.rb
+++ b/app/controllers/referentials_controller.rb
@@ -6,6 +6,10 @@ class ReferentialsController < InheritedResources::Base
show!
end
+ def create
+ create!
+ end
+
protected
def resource
@referential ||= current_organisation.referentials.find_by_id(params[:id])
@@ -13,5 +17,9 @@ class ReferentialsController < InheritedResources::Base
def collection
@referentials ||= current_organisation.referentials
end
+ def create_resource(referential)
+ referential.organisation = current_organisation
+ referential
+ end
end