diff --git a/app/views/apps/show.html.haml b/app/views/apps/show.html.haml index 0706cb9..7ae739a 100644 --- a/app/views/apps/show.html.haml +++ b/app/views/apps/show.html.haml @@ -16,7 +16,7 @@ - if @all_errs == true = link_to 'unresolved errs', app_path(@app), :class => 'button' - else - = link_to 'all errs', app_path(@app, {all_errs: true}), :class => 'button' + = link_to 'all errs', app_path(@app, {:all_errs => true}), :class => 'button' %h3{:id => 'watchers_toggle'} Watchers diff --git a/app/views/errs/_table.html.haml b/app/views/errs/_table.html.haml index 09e5d12..b3e3ff3 100644 --- a/app/views/errs/_table.html.haml +++ b/app/views/errs/_table.html.haml @@ -13,9 +13,9 @@ %td.app = link_to err.app.name, app_path(err.app) - if current_page?(:controller => 'errs') - %span.environment= link_to err.environment, errs_path(environment: err.environment) + %span.environment= link_to err.environment, errs_path(:environment => err.environment) - else - %span.environment= link_to err.environment, app_path(err.app, environment: err.environment) + %span.environment= link_to err.environment, app_path(err.app, :environment => err.environment) %td.message = link_to err.message, app_err_path(err.app, err) %em= err.where diff --git a/spec/controllers/apps_controller_spec.rb b/spec/controllers/apps_controller_spec.rb index 161dfdf..0ba2405 100644 --- a/spec/controllers/apps_controller_spec.rb +++ b/spec/controllers/apps_controller_spec.rb @@ -77,20 +77,20 @@ describe AppsController do context 'with resolved errors' do before(:each) do - resolved_err = Factory.create(:err, app: @app, resolved: true) - Factory.create(:notice, err: resolved_err) + resolved_err = Factory.create(:err, :app => @app, :resolved => true) + Factory.create(:notice, :err => resolved_err) end context 'and no params' do it 'shows only unresolved errs' do - get :show, id: @app.id + get :show, :id => @app.id assigns(:errs).size.should == 1 end end context 'and all_errs=true params' do it 'shows all errors' do - get :show, id: @app.id, all_errs: true + get :show, :id => @app.id, :all_errs => true assigns(:errs).size.should == 2 end end @@ -100,41 +100,41 @@ describe AppsController do before(:each) do environments = ['production', 'test', 'development', 'staging'] 20.times do |i| - Factory.create(:err, app: @app, environment: environments[i % environments.length]) + Factory.create(:err, :app => @app, :environment => environments[i % environments.length]) end end context 'no params' do it 'shows errs for all environments' do - get :show, id: @app.id + get :show, :id => @app.id assigns(:errs).size.should == 21 end end context 'environment production' do it 'shows errs for just production' do - get :show, id: @app.id, environment: :production + get :show, :id => @app.id, :environment => :production assigns(:errs).size.should == 6 end end context 'environment staging' do it 'shows errs for just staging' do - get :show, id: @app.id, environment: :staging + get :show, :id => @app.id, :environment => :staging assigns(:errs).size.should == 5 end end context 'environment development' do it 'shows errs for just development' do - get :show, id: @app.id, environment: :development + get :show, :id => @app.id, :environment => :development assigns(:errs).size.should == 5 end end context 'environment test' do it 'shows errs for just test' do - get :show, id: @app.id, environment: :test + get :show, :id => @app.id, :environment => :test assigns(:errs).size.should == 5 end end @@ -435,4 +435,3 @@ describe AppsController do end end - diff --git a/spec/controllers/errs_controller_spec.rb b/spec/controllers/errs_controller_spec.rb index e6bcbf8..5d9a05f 100644 --- a/spec/controllers/errs_controller_spec.rb +++ b/spec/controllers/errs_controller_spec.rb @@ -53,7 +53,7 @@ describe ErrsController do before(:each) do environments = ['production', 'test', 'development', 'staging'] 20.times do |i| - Factory.create(:err, environment: environments[i % environments.length]) + Factory.create(:err, :environment => environments[i % environments.length]) end end @@ -66,28 +66,28 @@ describe ErrsController do context 'environment production' do it 'shows errs for just production' do - get :index, environment: :production + get :index, :environment => :production assigns(:errs).size.should == 6 end end context 'environment staging' do it 'shows errs for just staging' do - get :index, environment: :staging + get :index, :environment => :staging assigns(:errs).size.should == 5 end end context 'environment development' do it 'shows errs for just development' do - get :index, environment: :development + get :index, :environment => :development assigns(:errs).size.should == 5 end end context 'environment test' do it 'shows errs for just test' do - get :index, environment: :test + get :index, :environment => :test assigns(:errs).size.should == 5 end end -- libgit2 0.21.2