Skip to content

Commit a103891

Browse files
committed
bundle exec rubocop -A
1 parent 02a7cfc commit a103891

17 files changed

+21
-13
lines changed

app/controllers/application_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class ApplicationController < ActionController::Base
1515

1616
include GlobalHelpers
1717
include Pundit::Authorization
18+
1819
helper_method GlobalHelpers.instance_methods
1920

2021
rescue_from Pundit::NotAuthorizedError, with: :user_not_authorized

app/controllers/concerns/paginable.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# rubocop:disable Metrics/ModuleLength
55
module Paginable
66
extend ActiveSupport::Concern
7+
78
require 'sort_direction'
89

910
##

app/controllers/contributors_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Controller for the Contributors page
44
class ContributorsController < ApplicationController
55
include OrgSelectable
6+
67
helper PaginableHelper
78

89
before_action :fetch_plan

app/controllers/notes_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Controller for the Comments section of the Write Plan page
44
class NotesController < ApplicationController
55
include ConditionalUserMailer
6+
67
after_action :verify_authorized
78
respond_to :html
89

app/controllers/org_admin/sections_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ def index
1414
authorize Section.new
1515
phase = Phase.includes(:template, :sections).find(params[:phase_id])
1616
edit = phase.template.latest? &&
17-
(current_user.can_modify_templates? &&
18-
(phase.template.org_id == current_user.org_id))
17+
current_user.can_modify_templates? &&
18+
(phase.template.org_id == current_user.org_id)
1919
render partial: 'index',
2020
locals: {
2121
template: phase.template,

app/controllers/org_admin/template_customizations_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module OrgAdmin
55
class TemplateCustomizationsController < ApplicationController
66
include Paginable
77
include Versionable
8+
89
after_action :verify_authorized
910

1011
# POST /org_admin/templates/:id/customize

app/controllers/roles_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Controller that handles adding/updating/removing collaborators from a plan
44
class RolesController < ApplicationController
55
include ConditionalUserMailer
6+
67
respond_to :html
78

89
after_action :verify_authorized
@@ -30,8 +31,7 @@ def create
3031
user = User.where_case_insensitive('email', role_params[:user][:email]).first
3132
if user.present? &&
3233
Role.where(plan: @role.plan, user: user, active: true)
33-
.count
34-
.positive? # role already exists
34+
.any? # role already exists
3535

3636
flash[:notice] = format(_('Plan is already shared with %{email}.'),
3737
email: role_params[:user][:email])

app/controllers/users_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ class UsersController < ApplicationController
55
helper PaginableHelper
66
helper PermsHelper
77
include ConditionalUserMailer
8+
89
after_action :verify_authorized
910
respond_to :html
1011

app/mailers/user_mailer.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ class UserMailer < ActionMailer::Base
55
prepend_view_path 'app/views/branded/'
66

77
include MailerHelper
8+
89
helper MailerHelper
910
helper FeedbacksHelper
1011

app/models/identifier.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def self.by_scheme_name(scheme, identifiable_type)
6161
# Ensure that the value of attrs is a hash
6262
# TODO: evaluate this vs the Serialize approach in condition.rb
6363
def attrs=(hash)
64-
super(hash.is_a?(Hash) ? hash.to_json.to_s : '{}')
64+
super(hash.is_a?(Hash) ? hash.to_json : '{}')
6565
end
6666

6767
# Appends the identifier scheme's prefix to the identifier if necessary

0 commit comments

Comments
 (0)