app/services/sample_membership_request_creator.rb
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
Open
message: I18n.t("sample_membership_request.message")
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Inconsistent indentation detected. Open
Open
def create_notification
sender = @membership_request.user
MembershipRequestNotification.create(
user: user,
- Read upRead up
- Exclude checks
This cops checks for inconsistent indentation.
Example:
class A
def test
puts 'hello'
puts 'world'
end
end
Inconsistent indentation detected. Open
Open
def sample_user
(SampleUser.all - group.members).sample
end
- Read upRead up
- Exclude checks
This cops checks for inconsistent indentation.
Example:
class A
def test
puts 'hello'
puts 'world'
end
end
Inconsistent indentation detected. Open
Open
def create_membership_request
@membership_request = MembershipRequest.create(
user: sample_user,
group: group,
message: I18n.t("sample_membership_request.message")
- Read upRead up
- Exclude checks
This cops checks for inconsistent indentation.
Example:
class A
def test
puts 'hello'
puts 'world'
end
end
Inconsistent indentation detected. Open
Open
attr_reader :user, :group, :membership_request
- Read upRead up
- Exclude checks
This cops checks for inconsistent indentation.
Example:
class A
def test
puts 'hello'
puts 'world'
end
end