Module: Publishable
- Included in:
- Accession, AgentContact, AgentCorporateEntity, AgentFamily, AgentPerson, AgentSoftware, ArchivalObject, Classification, ClassificationTerm, DigitalObject, DigitalObjectComponent, ExternalDocument, FileVersion, Note, Repository, Resource, Subject
- Defined in:
- backend/app/model/mixins/publishable.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Class Method Details
.db_value_for(hash) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'backend/app/model/mixins/publishable.rb', line 8 def self.db_value_for(hash) published = Preference.defaults['publish'] if hash.has_key?('publish') published = hash['publish'] end published ? 1 : 0 end |
.included(base) ⇒ Object
3 4 5 |
# File 'backend/app/model/mixins/publishable.rb', line 3 def self.included(base) base.extend(ClassMethods) end |