iachat/app/models/concerns/conversation_mute_helpers.rb
Gabriel Jablonski 659c3e7c2f chore: apply Rails/SaveBang cop (#15)
* chore: apply Rails/SaveBang cop

* fix: correct locale validation in category model spec

* fix: update save methods to avoid Rails/SaveBang cop violations
2025-04-03 23:29:24 -03:00

19 lines
285 B
Ruby

module ConversationMuteHelpers
extend ActiveSupport::Concern
def mute!
resolved!
contact.update!(blocked: true)
create_muted_message
end
def unmute!
contact.update!(blocked: false)
create_unmuted_message
end
def muted?
contact.blocked?
end
end