You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/views/projects/branches.json.jbuilder

23 lines
637 B

json.array! @branches do |branch|
json.name branch['name']
5 years ago
json.user_can_push branch['user_can_push']
json.user_can_merge branch['user_can_merge']
json.protected branch['protected']
json.last_commit do
json.id branch['commit']['id']
json.message branch['commit']['message']
json.timestamp render_unix_time(branch['commit']['timestamp'])
json.time_from_now time_from_now(branch['commit']['timestamp'])
end
5 years ago
user = User.find_by_login branch['commit']['author']['name']
5 years ago
json.author do
5 years ago
if user
json.login user.login
json.image_url url_to_avatar(user)
else
json.nil
end
5 years ago
end
end