summaryrefslogtreecommitdiff
path: root/users/app/models
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2013-04-03 11:22:16 +0200
committerAzul <azul@leap.se>2013-04-03 11:22:16 +0200
commit654ab25fa4659119d5ddaa9ae116fce69a386ab1 (patch)
tree0f0adf5a0c92a20a7084c251dafac7a420f9b640 /users/app/models
parentf4172ac9ea7a484659fa2019119533bc9569880f (diff)
make sure user tests also run when run from users subdir
* The APP_CONFIG needs to be initialized in core so that is required from other engines * paths for load_views need to be relative to the model - not to rails root.
Diffstat (limited to 'users/app/models')
-rw-r--r--users/app/models/user.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/users/app/models/user.rb b/users/app/models/user.rb
index c9b367f..62c5054 100644
--- a/users/app/models/user.rb
+++ b/users/app/models/user.rb
@@ -47,7 +47,8 @@ class User < CouchRest::Model::Base
timestamps!
design do
- load_views(Rails.root.join('users', 'app', 'designs', 'user'))
+ own_path = Pathname.new(File.dirname(__FILE__))
+ load_views(own_path.join('..', 'designs', 'user'))
view :by_login
view :by_created_at
end