app/models/legislation/process.rb
Line is too long. [108/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
Open
Legislation::Process::Phase.new(allegations_start_date, allegations_end_date, allegations_phase_enabled)
- Exclude checks
Line is too long. [122/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
Open
PHASES_AND_PUBLICATIONS = %i(debate_phase allegations_phase proposals_phase draft_publication result_publication).freeze
- Exclude checks
Line is too long. [134/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
Open
errors.add(:debate_end_date, :invalid_date_range) if debate_end_date && debate_start_date && debate_end_date < debate_start_date
- Exclude checks
Line is too long. [137/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
Open
has_many :questions, -> { order(:id) }, class_name: 'Legislation::Question', foreign_key: 'legislation_process_id', dependent: :destroy
- Exclude checks
Line is too long. [127/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
Open
has_one :final_draft_version, -> { where final_version: true, status: 'published' }, class_name: 'Legislation::DraftVersion',
- Exclude checks
Line is too long. [104/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
Open
if allegations_end_date && allegations_start_date && allegations_end_date < allegations_start_date
- Exclude checks
%i
-literals should be delimited by [
and ]
. (https://github.com/bbatsov/ruby-style-guide#percent-literal-braces) Open
Open
PHASES_AND_PUBLICATIONS = %i(debate_phase allegations_phase proposals_phase draft_publication result_publication).freeze
- 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)
Line is too long. [105/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
Open
foreign_key: 'legislation_process_id', dependent: :destroy
- Exclude checks
Line is too long. [109/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
Open
scope :open, -> { where("start_date <= ? and end_date >= ?", Date.current, Date.current).order('id DESC') }
- Exclude checks
Line is too long. [137/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
Open
has_many :proposals, -> { order(:id) }, class_name: 'Legislation::Proposal', foreign_key: 'legislation_process_id', dependent: :destroy
- Exclude checks
Line is too long. [114/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
Open
Legislation::Process::Phase.new(proposals_phase_start_date, proposals_phase_end_date, proposals_phase_enabled)
- Exclude checks
Line is too long. [124/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
Open
foreign_key: 'legislation_process_id'
- Exclude checks