#794: fix undefined method 'public' for nil:NilClass

This commit is contained in:
Vokhmin Alexey V 2012-12-21 18:06:07 +04:00
parent 7f14958a89
commit a558ec622f
1 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,11 @@
json.repository do |json|
json.partial! 'repository', :repository => @repository, :json => json
json.key_pair do |json_key_pair|
json_key_pair.(@repository.key_pair, :public, :secret)
if @repository.key_pair
json_key_pair.(@repository.key_pair, :public, :secret)
else
json_key_pair.public ''
json_key_pair.secret ''
end
end
end