dev_forge
Jasder 5 years ago
parent 2574f72834
commit 1077fcb411

@ -9,9 +9,14 @@ json.array! @branches do |branch|
json.timestamp render_unix_time(branch['commit']['timestamp']) json.timestamp render_unix_time(branch['commit']['timestamp'])
json.time_from_now time_from_now(branch['commit']['timestamp']) json.time_from_now time_from_now(branch['commit']['timestamp'])
end end
user = User.find_by_login branch['commit']['author']['name']
json.author do json.author do
user = User.find_by_login branch['commit']['author']['name'] if user
json.login user.login json.login user.login
json.image_url url_to_avatar(user) json.image_url url_to_avatar(user)
else
json.nil
end
end end
end end

Loading…
Cancel
Save