aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/chouette_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/chouette_controller.rb')
-rw-r--r--app/controllers/chouette_controller.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/controllers/chouette_controller.rb b/app/controllers/chouette_controller.rb
new file mode 100644
index 000000000..051e2fd77
--- /dev/null
+++ b/app/controllers/chouette_controller.rb
@@ -0,0 +1,13 @@
+class ChouetteController < InheritedResources::Base
+
+ before_filter :switch_referential
+
+ def switch_referential
+ Apartment::Database.switch(referential.slug)
+ end
+
+ def referential
+ @referential = Referential.find params[:referential_id]
+ end
+
+end \ No newline at end of file