Commit ac0691c0b757c9ff81fdd9e51d0f63935cfdfd71
1 parent
432e02fb
Exists in
master
and in
1 other branch
Rubocop: manually fix useless assignments
Now this succeeds: $ bundle exec rubocop --lint --only UselessAssignment
Showing
4 changed files
with
6 additions
and
7 deletions
Show diff stats
app/controllers/problems_controller.rb
@@ -128,7 +128,6 @@ class ProblemsController < ApplicationController | @@ -128,7 +128,6 @@ class ProblemsController < ApplicationController | ||
128 | 128 | ||
129 | def search | 129 | def search |
130 | ps = Problem.search(params[:search]).for_apps(app_scope).in_env(params[:environment]).all_else_unresolved(params[:all_errs]).ordered_by(params_sort, params_order) | 130 | ps = Problem.search(params[:search]).for_apps(app_scope).in_env(params[:environment]).all_else_unresolved(params[:all_errs]).ordered_by(params_sort, params_order) |
131 | - selected_problems = params[:problems] || [] | ||
132 | self.problems = ps.page(params[:page]).per(current_user.per_page) | 131 | self.problems = ps.page(params[:page]).per(current_user.per_page) |
133 | respond_to do |format| | 132 | respond_to do |format| |
134 | format.html { render :index } | 133 | format.html { render :index } |
app/helpers/form_helper.rb
@@ -5,8 +5,8 @@ module FormHelper | @@ -5,8 +5,8 @@ module FormHelper | ||
5 | 5 | ||
6 | content_tag(:div, :class => 'error-messages') do | 6 | content_tag(:div, :class => 'error-messages') do |
7 | body = content_tag(:h2, 'Dang. The following errors are keeping this from being a success.') | 7 | body = content_tag(:h2, 'Dang. The following errors are keeping this from being a success.') |
8 | - body += content_tag(:ul) do | ||
9 | - document.errors.full_messages.inject('') {|errs, msg| errs += content_tag(:li, h(msg)) }.html_safe | 8 | + body + content_tag(:ul) do |
9 | + document.errors.full_messages.inject('') {|errs, msg| errs + content_tag(:li, h(msg)) }.html_safe | ||
10 | end | 10 | end |
11 | end | 11 | end |
12 | end | 12 | end |
spec/lib/airbrake_api/v3/notice_parser_spec.rb
@@ -42,7 +42,7 @@ describe AirbrakeApi::V3::NoticeParser do | @@ -42,7 +42,7 @@ describe AirbrakeApi::V3::NoticeParser do | ||
42 | params['key'] = app.api_key | 42 | params['key'] = app.api_key |
43 | 43 | ||
44 | report = AirbrakeApi::V3::NoticeParser.new(params).report | 44 | report = AirbrakeApi::V3::NoticeParser.new(params).report |
45 | - notice = report.generate_notice! | 45 | + report.generate_notice! |
46 | 46 | ||
47 | expect(report.error_class).to eq('Error') | 47 | expect(report.error_class).to eq('Error') |
48 | expect(report.message).to eq('Error: TestError') | 48 | expect(report.message).to eq('Error: TestError') |
@@ -58,4 +58,4 @@ describe AirbrakeApi::V3::NoticeParser do | @@ -58,4 +58,4 @@ describe AirbrakeApi::V3::NoticeParser do | ||
58 | 58 | ||
59 | data | 59 | data |
60 | end | 60 | end |
61 | -end | ||
62 | \ No newline at end of file | 61 | \ No newline at end of file |
62 | +end |
spec/models/notification_service/gtalk_service_spec.rb
@@ -2,7 +2,7 @@ describe NotificationServices::GtalkService, type: 'model' do | @@ -2,7 +2,7 @@ describe NotificationServices::GtalkService, type: 'model' do | ||
2 | it "it should send a notification to gtalk" do | 2 | it "it should send a notification to gtalk" do |
3 | # setup | 3 | # setup |
4 | notice = Fabricate :notice | 4 | notice = Fabricate :notice |
5 | - problem = notice.problem | 5 | + notice.problem |
6 | notification_service = Fabricate :gtalk_notification_service, :app => notice.app | 6 | notification_service = Fabricate :gtalk_notification_service, :app => notice.app |
7 | problem = notice.problem | 7 | problem = notice.problem |
8 | 8 | ||
@@ -94,7 +94,7 @@ describe NotificationServices::GtalkService, type: 'model' do | @@ -94,7 +94,7 @@ describe NotificationServices::GtalkService, type: 'model' do | ||
94 | it "it should send a notification to room only" do | 94 | it "it should send a notification to room only" do |
95 | # setup | 95 | # setup |
96 | notice = Fabricate :notice | 96 | notice = Fabricate :notice |
97 | - problem = notice.problem | 97 | + notice.problem |
98 | notification_service = Fabricate :gtalk_notification_service, :app => notice.app | 98 | notification_service = Fabricate :gtalk_notification_service, :app => notice.app |
99 | problem = notice.problem | 99 | problem = notice.problem |
100 | 100 |