From 2d821da1579e8dccffd3e0fe4652f0c8f6781a52 Mon Sep 17 00:00:00 2001 From: Jan Sandbrink Date: Tue, 17 Feb 2015 16:41:19 +0100 Subject: [PATCH] prefix representers to help rails out some some reason it get random NameErrors in development mode otherwise... I don't know why nobody else is getting those, but I am getting them quite reliably when opening the work package view and then the work package details pane... --- lib/api/v3/users/users_api.rb | 4 ++-- lib/api/v3/work_packages/work_packages_api.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/api/v3/users/users_api.rb b/lib/api/v3/users/users_api.rb index 6d0d6f39e5..1e1b8389bd 100644 --- a/lib/api/v3/users/users_api.rb +++ b/lib/api/v3/users/users_api.rb @@ -37,7 +37,7 @@ module API # Show updated user status 200 - UserRepresenter.new(@user, current_user: current_user) + Users::UserRepresenter.new(@user, current_user: current_user) else fail ::API::Errors::InvalidUserStatusTransition end @@ -56,7 +56,7 @@ module API end get do - UserRepresenter.new(@user, current_user: current_user) + Users::UserRepresenter.new(@user, current_user: current_user) end delete do diff --git a/lib/api/v3/work_packages/work_packages_api.rb b/lib/api/v3/work_packages/work_packages_api.rb index bcd9649534..72063ec1bd 100644 --- a/lib/api/v3/work_packages/work_packages_api.rb +++ b/lib/api/v3/work_packages/work_packages_api.rb @@ -78,8 +78,8 @@ module API before do @work_package = WorkPackage.find(params[:id]) - @representer = WorkPackageRepresenter.new(work_package, - current_user: current_user) + @representer = WorkPackages::WorkPackageRepresenter.new(work_package, + current_user: current_user) end get do