Fixed: undefined method admin?

This commit is contained in:
Vokhmin Alexey V 2014-04-18 21:17:17 +04:00
parent 9e55a362d9
commit 559e41d94b
1 changed files with 1 additions and 1 deletions

View File

@ -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)