From 559e41d94b2d654def1636b5c4cfc82b3d89f422 Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Fri, 18 Apr 2014 21:17:17 +0400 Subject: [PATCH] Fixed: undefined method admin? --- app/views/projects/build_lists/show.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/projects/build_lists/show.json.jbuilder b/app/views/projects/build_lists/show.json.jbuilder index 1f723f807..95a492056 100644 --- a/app/views/projects/build_lists/show.json.jbuilder +++ b/app/views/projects/build_lists/show.json.jbuilder @@ -31,7 +31,7 @@ json.build_list do json.builder do json.fullname @build_list.builder.try(:fullname) json.path user_path(@build_list.builder) - end if @build_list.builder && (!@build_list.builder.system? || current_user.admin?) + end if @build_list.builder && (!@build_list.builder.system? || current_user.try(:admin?)) json.advisory do json.(@build_list.advisory, :description, :advisory_id)