Files
chatwoot/app/models/telegram_bot.rb
Sojan Jose 7776b74126 chore: Apply fixes for items in rubocop_todo [CW-1806] (#8864)
This PR addresses several items listed in our rubocop_todo by implementing the necessary corrections and enhancements. As a result, we are now able to remove the rubocop_todo file entirely, streamlining our codebase and ensuring adherence to our coding standards.

fixes: https://linear.app/chatwoot/issue/CW-1806/chore-rubocop-audit
2024-02-07 13:36:04 +04:00

18 lines
442 B
Ruby

# == Schema Information
#
# Table name: telegram_bots
#
# id :integer not null, primary key
# auth_key :string
# name :string
# created_at :datetime not null
# updated_at :datetime not null
# account_id :integer
#
class TelegramBot < ApplicationRecord
belongs_to :account
has_one :inbox, as: :channel, dependent: :destroy_async
validates :auth_key, uniqueness: { scope: :account_id }
end