Top Level Namespace
Defined Under Namespace
Modules: EnjuSubject
Classes: Classification, ClassificationPolicy, ClassificationType, ClassificationTypePolicy, ClassificationTypesController, ClassificationsController, Subject, SubjectHeadingType, SubjectHeadingTypePolicy, SubjectHeadingTypesController, SubjectPolicy, SubjectType, SubjectTypePolicy, SubjectTypesController, SubjectsController
Instance Method Summary
collapse
Instance Method Details
#update_subject_heading_type ⇒ Object
1
2
3
4
5
6
|
# File 'lib/tasks/subject_heading_type.rb', line 1
def update_subject_heading_type
unknown = SubjectHeadingType.where(name: 'unknown').first
unless unknown
SubjectHeadingType.create!(name: 'unknown')
end
end
|
#update_subject_type ⇒ Object
1
2
3
4
5
6
7
8
9
10
|
# File 'lib/tasks/subject_type.rb', line 1
def update_subject_type
concept = SubjectType.where(name: 'Concept').first
concept.update_column(:name, 'concept') if concept
event = SubjectType.where(name: 'Event').first
event.update_column(:name, 'event') if event
object = SubjectType.where(name: 'Object').first
object.update_column(:name, 'object') if object
place = SubjectType.where(name: 'Place').first
place.update_column(:name, 'place') if place
end
|