Chatwoot/app/models/canned_response.rb
Mukesh Chaudhary c08074b981 Annotations (#327)
* Add annotate gem to the project
* Annotate models, fixtures, factories and model_specs
* Keep annotations only in Models
* Remove unwanted changes in model specs
* Exclude auto_annotate_models from rubocop
2019-11-30 19:09:55 +05:30

20 lines
509 B
Ruby

# == Schema Information
#
# Table name: canned_responses
#
# id :integer not null, primary key
# content :text
# short_code :string
# created_at :datetime not null
# updated_at :datetime not null
# account_id :integer not null
#
class CannedResponse < ApplicationRecord
validates_presence_of :content
validates_presence_of :short_code
validates_presence_of :account
validates_uniqueness_of :short_code, scope: :account_id
belongs_to :account
end