Sha256: 1d31ae64b0e30dac432c71d39bb6cf28875327d4ccf6386d2342f7f0d7862c5c

Contents?: true

Size: 334 Bytes

Versions: 19

Compression:

Stored size: 334 Bytes

Contents

module WithDiscussionStatus
  extend ActiveSupport::Concern

  included do
    serialize :status, Mumuki::Laboratory::Status::Discussion
    validates_presence_of :status
    scope :by_status, -> (status) { where(status: status) }
  end

  delegate :closed?, :opened?, :solved?, :pending_review?, :reachable_statuses, to: :status
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
mumuki-laboratory-5.13.0 app/models/concerns/with_discussion_status.rb
mumuki-laboratory-5.12.1 app/models/concerns/with_discussion_status.rb
mumuki-laboratory-5.12.0 app/models/concerns/with_discussion_status.rb
mumuki-laboratory-5.11.0 app/models/concerns/with_discussion_status.rb
mumuki-laboratory-5.10.4 app/models/concerns/with_discussion_status.rb
mumuki-laboratory-5.10.3 app/models/concerns/with_discussion_status.rb
mumuki-laboratory-5.10.2 app/models/concerns/with_discussion_status.rb
mumuki-laboratory-5.10.1 app/models/concerns/with_discussion_status.rb
mumuki-laboratory-5.10.0 app/models/concerns/with_discussion_status.rb
mumuki-laboratory-5.9.1 app/models/concerns/with_discussion_status.rb
mumuki-laboratory-5.9.0 app/models/concerns/with_discussion_status.rb
mumuki-laboratory-5.8.3 app/models/concerns/with_discussion_status.rb
mumuki-laboratory-5.8.1 app/models/concerns/with_discussion_status.rb
mumuki-laboratory-5.8.0 app/models/concerns/with_discussion_status.rb
mumuki-laboratory-5.7.0 app/models/concerns/with_discussion_status.rb
mumuki-laboratory-5.6.3 app/models/concerns/with_discussion_status.rb
mumuki-laboratory-5.6.2 app/models/concerns/with_discussion_status.rb
mumuki-laboratory-5.6.1 app/models/concerns/with_discussion_status.rb
mumuki-laboratory-5.6.0 app/models/concerns/with_discussion_status.rb