1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-12 23:09:03 +01:00
fab-manager/app/models/open_api/client.rb
2020-03-25 12:35:09 +01:00

10 lines
269 B
Ruby

class OpenAPI::Client < ApplicationRecord
has_many :calls_count_tracings, foreign_key: :open_api_client_id, dependent: :destroy
has_secure_token
validates :name, presence: true
def increment_calls_count
update_column(:calls_count, calls_count+1)
end
end