From 6a64927d57076ea776d06dfb826113969ee95282 Mon Sep 17 00:00:00 2001 From: Alex Coles Date: Wed, 23 Jul 2014 14:19:52 +0200 Subject: [PATCH] Minor refactoring of ProjectsAPI Remove unnecessary ivars, absolute namespacing. Signed-off-by: Alex Coles --- lib/api/v3/projects/projects_api.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/api/v3/projects/projects_api.rb b/lib/api/v3/projects/projects_api.rb index e1f641d306..f645c2cb74 100644 --- a/lib/api/v3/projects/projects_api.rb +++ b/lib/api/v3/projects/projects_api.rb @@ -39,13 +39,12 @@ module API namespace ':id' do before do @project = Project.find(params[:id]) - model = ::API::V3::Projects::ProjectModel.new(@project) - @representer = ::API::V3::Projects::ProjectRepresenter.new(model) + @model = ProjectModel.new(@project) end get do authorize(:view_project, context: @project) - @representer + ProjectRepresenter.new(@model) end mount API::V3::Versions::VersionsAPI