replaces array of strings with %w

This commit is contained in:
kikito
2017-01-01 12:50:40 +01:00
parent f6e4443437
commit c17dcf1bab

View File

@@ -14,8 +14,9 @@ class Budget < ActiveRecord::Base
has_many :groups, dependent: :destroy
has_many :headings, through: :groups
scope :on_hold, -> { where(phase: ["reviewing", "valuating", "reviewing_ballots"]) }
before_validation :sanitize_descriptions
scope :on_hold, -> { where(phase: %w(reviewing valuating reviewing_ballots")) }
scope :accepting, -> { where(phase: "accepting") }
scope :reviewing, -> { where(phase: "reviewing") }
scope :selecting, -> { where(phase: "selecting") }