app/models/georgia/status.rb in georgia-0.7.8 vs app/models/georgia/status.rb in georgia-0.8.0

- old
+ new

@@ -5,16 +5,14 @@ DRAFT = 'Draft' PENDING_REVIEW = 'Pending Review' has_many :pages - attr_accessible :name, :label, :icon - validates :name, presence: true - scope :published, where(name: PUBLISHED) - scope :draft, where(name: DRAFT) - scope :pending_review, where(name: PENDING_REVIEW) + scope :published, -> { where(name: PUBLISHED) } + scope :draft, -> { where(name: DRAFT) } + scope :pending_review, -> { where(name: PENDING_REVIEW) } def published? self.name == PUBLISHED end def draft? \ No newline at end of file