hpham17/esential-2016

View on GitHub
app/helpers/application_helper.rb

Summary

Maintainability
A
0 mins
Test Coverage

Unused method argument - opts. If it's necessary, use _ or _opts as an argument name to indicate that it won't be used. You can also write as flash_messages(*) if you want the method to accept any arguments but don't care about them.
Open

  def flash_messages(opts = {})
Severity: Minor
Found in app/helpers/application_helper.rb by rubocop

This cop checks for unused method arguments.

Example:

# bad

def some_method(used, unused, _unused_but_allowed)
  puts used
end

Example:

# good

def some_method(used, _unused, _unused_but_allowed)
  puts used
end

end at 11, 12 is not aligned with content_tag(:div, message, class: "alert #{bootstrap_class_for(msg_type)} fade in") do at 8, 13 or concat(content_tag(:div, message, class: "alert #{bootstrap_class_for(msg_type)} fade in") do at 8, 6.
Open

            end)
Severity: Minor
Found in app/helpers/application_helper.rb by rubocop

This cop checks whether the end keywords are aligned properly for do end blocks.

Three modes are supported through the EnforcedStyleAlignWith configuration parameter:

start_of_block : the end shall be aligned with the start of the line where the do appeared.

start_of_line : the end shall be aligned with the start of the line where the expression started.

either (which is the default) : the end is allowed to be in either location. The autofixer will default to start_of_line.

Example: EnforcedStyleAlignWith: either (default)

# bad

foo.bar
   .each do
     baz
       end

# good

variable = lambda do |i|
  i
end

Example: EnforcedStyleAlignWith: startofblock

# bad

foo.bar
   .each do
     baz
       end

# good

foo.bar
  .each do
     baz
   end

Example: EnforcedStyleAlignWith: startofline

# bad

foo.bar
   .each do
     baz
       end

# good

foo.bar
  .each do
     baz
end

There are no issues that match your filters.

Category
Status