Skip to content

Commit

Permalink
Rubocop: Redundant self
Browse files Browse the repository at this point in the history
  • Loading branch information
CloCkWeRX committed Jan 10, 2017
1 parent a07088a commit 7d05311
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
8 changes: 0 additions & 8 deletions .rubocop_todo.yml
Expand Up @@ -467,14 +467,6 @@ Style/PredicateName:
- 'lib/fat_free_crm/fields.rb'
- 'lib/fat_free_crm/mail_processor/base.rb'

# Offense count: 3
# Cop supports --auto-correct.
Style/RedundantSelf:
Exclude:
- 'app/models/users/user.rb'
- 'db/migrate/20100928030620_remove_uuid.rb'
- 'lib/fat_free_crm/fields.rb'

# Offense count: 18
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes.
Expand Down
2 changes: 1 addition & 1 deletion app/models/users/user.rb
Expand Up @@ -105,7 +105,7 @@ def suspended?

#----------------------------------------------------------------------------
def awaits_approval?
self.suspended? && login_count == 0 && Setting.user_signup == :needs_approval
suspended? && login_count == 0 && Setting.user_signup == :needs_approval
end

#----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20100928030620_remove_uuid.rb
Expand Up @@ -4,7 +4,7 @@ class RemoveUuid < ActiveRecord::Migration
def self.up
[:users, :accounts, :campaigns, :leads, :contacts, :opportunities, :tasks].each do |table|
remove_column table, :uuid
execute("DROP TRIGGER IF EXISTS #{table}_uuid") if self.uuid_configured?
execute("DROP TRIGGER IF EXISTS #{table}_uuid") if uuid_configured?
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/fat_free_crm/fields.rb
Expand Up @@ -79,7 +79,7 @@ def method_missing(method_id, *args, &block)
# Refresh columns and try again.
self.class.reset_column_information
# If new record, create new object from class, else reload class
object = self.new_record? ? self.class.new : (reload && self)
object = new_record? ? self.class.new : (reload && self)
# ensure serialization is setup if needed
self.class.serialize_custom_fields!
# Try again if object now responds to method, else return nil
Expand Down

0 comments on commit 7d05311

Please sign in to comment.