Commit 7f5f16cd571f119c2aa0669fa2ee0f2d9bef19f4
Committed by
Nick Recobra
1 parent
717eec1a
Exists in
master
and in
1 other branch
List all deploys for an app but with no pagination
Showing
4 changed files
with
31 additions
and
1 deletions
Show diff stats
app/controllers/deploys_controller.rb
@@ -13,5 +13,11 @@ class DeploysController < ApplicationController | @@ -13,5 +13,11 @@ class DeploysController < ApplicationController | ||
13 | }) | 13 | }) |
14 | render :xml => @deploy | 14 | render :xml => @deploy |
15 | end | 15 | end |
16 | + | ||
17 | + def index | ||
18 | + app = current_user.apps.find(:conditions => {:name => params[:app_id]}).first | ||
19 | + | ||
20 | + @deploys = app.deploys.order_by(:created_at.desc) | ||
21 | + end | ||
16 | 22 | ||
17 | -end | ||
18 | \ No newline at end of file | 23 | \ No newline at end of file |
24 | +end |
@@ -0,0 +1,20 @@ | @@ -0,0 +1,20 @@ | ||
1 | +%table.errs | ||
2 | + %thead | ||
3 | + %tr | ||
4 | + %th App | ||
5 | + %th When | ||
6 | + %th Who | ||
7 | + %th Message | ||
8 | + %th Repository | ||
9 | + %th Revision | ||
10 | + %tbody | ||
11 | + - deploys.each do |deploy| | ||
12 | + %tr | ||
13 | + %td.app | ||
14 | + = deploy.app.name | ||
15 | + %span.environment= deploy.environment | ||
16 | + %td.latest #{time_ago_in_words(deploy.created_at)} ago | ||
17 | + %td.who #{deploy.username} | ||
18 | + %td.message #{deploy.message} | ||
19 | + %td.repository #{deploy.repository} | ||
20 | + %td.revision #{deploy.revision} |
config/routes.rb