5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 14:06:21 +00:00
panel/app/models/concerns/aasm_events_concern.rb

22 lines
448 B
Ruby
Raw Normal View History

2024-03-04 16:49:07 +00:00
# frozen_string_literal: true
module AasmEventsConcern
extend ActiveSupport::Concern
included do
# Todos los eventos de la máquina de estados
#
# @return [Array<Symbol>]
def self.events
aasm.events.map(&:name) - self::IGNORED_EVENTS
end
# Todos los estados de la máquina de estados
#
# @return [Array<Symbol>]
def self.states
aasm.states.map(&:name) - self::IGNORED_STATES
end
2024-03-04 16:49:07 +00:00
end
end