aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/referential.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/models/referential.rb b/app/models/referential.rb
index 3f4a62bb6..639e4de12 100644
--- a/app/models/referential.rb
+++ b/app/models/referential.rb
@@ -65,3 +65,15 @@ class Referential < ActiveRecord::Base
end
end
+
+Rails.application.config.after_initialize do
+ Chouette::ActiveRecord
+ puts "patch Chouette::ActiveRecord (#{__FILE__})"
+ class Chouette::ActiveRecord
+
+ def referential
+ @referential ||= Referential.where(:slug => Apartment::Database.current_database).first!
+ end
+
+ end
+end