diff options
author | Azul <azul@leap.se> | 2013-04-03 11:22:16 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2013-04-03 11:22:16 +0200 |
commit | 654ab25fa4659119d5ddaa9ae116fce69a386ab1 (patch) | |
tree | 0f0adf5a0c92a20a7084c251dafac7a420f9b640 /help | |
parent | f4172ac9ea7a484659fa2019119533bc9569880f (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 'help')
-rw-r--r-- | help/app/models/ticket.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/help/app/models/ticket.rb b/help/app/models/ticket.rb index a456fe5..738487a 100644 --- a/help/app/models/ticket.rb +++ b/help/app/models/ticket.rb @@ -47,7 +47,8 @@ class Ticket < CouchRest::Model::Base view :by_is_open_and_created_at view :by_is_open_and_updated_at - load_views(Rails.root.join('help', 'app', 'designs', 'ticket')) + own_path = Pathname.new(File.dirname(__FILE__)) + load_views(own_path.join('..', 'designs', 'ticket')) end validates :title, :presence => true |