b686936230
This wasn't working when creation and publishing happened on separated instances of the same record, which is what happens when you edit a draft and then you publish it https://app.fizzy.do/5986089/cards/2835/edit
16 lines
233 B
Ruby
16 lines
233 B
Ruby
module Card::Mentions
|
|
extend ActiveSupport::Concern
|
|
|
|
included do
|
|
include ::Mentions
|
|
|
|
def mentionable?
|
|
published?
|
|
end
|
|
|
|
def should_check_mentions?
|
|
saved_change_to_status? && published?
|
|
end
|
|
end
|
|
end
|