2019-07-19 22:37:53 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
# Las licencias son completamente traducibles
|
|
|
|
class Licencia < ApplicationRecord
|
|
|
|
extend Mobility
|
|
|
|
|
|
|
|
translates :name, type: :string, locale_accessors: true
|
|
|
|
translates :url, type: :string, locale_accessors: true
|
|
|
|
translates :description, type: :text, locale_accessors: true
|
2023-03-25 16:48:30 +00:00
|
|
|
translates :short_description, type: :string, locale_accessors: true
|
2019-07-19 22:37:53 +00:00
|
|
|
translates :deed, type: :text, locale_accessors: true
|
|
|
|
|
|
|
|
has_many :sites
|
|
|
|
|
|
|
|
validates :name, presence: true, uniqueness: true
|
|
|
|
validates :url, presence: true
|
|
|
|
validates :description, presence: true
|
2023-03-25 16:48:30 +00:00
|
|
|
validates :short_description, presence: true
|
2019-07-19 22:37:53 +00:00
|
|
|
validates :deed, presence: true
|
|
|
|
end
|