app/admin/proposal.rb
Block has too many lines. [81/25] Open
Open
ActiveAdmin.register Proposal do
actions :index, :show
permit_params :status
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Pass &:status
as an argument to column
instead of a block. Open
Open
tbl.column("Status") { |step| step.status }
- Read upRead up
- Exclude checks
Use symbols as procs when possible.
Example:
# bad
something.map { |s| s.upcase }
# good
something.map(&:upcase)
Pass &:created_at
as an argument to column
instead of a block. Open
Open
tbl.column("Created") { |step| step.created_at }
- Read upRead up
- Exclude checks
Use symbols as procs when possible.
Example:
# bad
something.map { |s| s.upcase }
# good
something.map(&:upcase)
Pass &:completer
as an argument to column
instead of a block. Open
Open
tbl.column("Completer") { |step| step.completer }
- Read upRead up
- Exclude checks
Use symbols as procs when possible.
Example:
# bad
something.map { |s| s.upcase }
# good
something.map(&:upcase)
%w
-literals should be delimited by [
and ]
. Open
Open
proposal_attributes = %w(id status created_at updated_at client_data_type public_id visit_id)
- Read upRead up
- Exclude checks
This cop enforces the consistent usage of %
-literal delimiters.
Specify the 'default' key to set all preferred delimiters at once. You can continue to specify individual preferred delimiters to override the default.
Example:
# Style/PercentLiteralDelimiters:
# PreferredDelimiters:
# default: '[]'
# '%i': '()'
# good
%w[alpha beta] + %i(gamma delta)
# bad
%W(alpha #{beta})
# bad
%I(alpha beta)
Pass &:updated_at
as an argument to column
instead of a block. Open
Open
tbl.column("Updated") { |step| step.updated_at }
- Read upRead up
- Exclude checks
Use symbols as procs when possible.
Example:
# bad
something.map { |s| s.upcase }
# good
something.map(&:upcase)
Pass &:completed_at
as an argument to column
instead of a block. Open
Open
tbl.column("Completed") { |step| step.completed_at }
- Read upRead up
- Exclude checks
Use symbols as procs when possible.
Example:
# bad
something.map { |s| s.upcase }
# good
something.map(&:upcase)
Pass &:user
as an argument to column
instead of a block. Open
Open
tbl.column("User") { |step| step.user }
- Read upRead up
- Exclude checks
Use symbols as procs when possible.
Example:
# bad
something.map { |s| s.upcase }
# good
something.map(&:upcase)