From 654ab25fa4659119d5ddaa9ae116fce69a386ab1 Mon Sep 17 00:00:00 2001 From: Azul Date: Wed, 3 Apr 2013 11:22:16 +0200 Subject: 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. --- help/app/models/ticket.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'help/app') 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 -- cgit v1.2.3