You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/models/concerns/publishable.rb

10 lines
177 B

module Publishable
extend ActiveSupport::Concern
included do
alias_attribute :publish, :is_publish
enum publish: { published: 1, unpublish: 0 }
end
end