language.rb revision c0098e1ef648442dc942ba42e2e9f9b54895e4aa
STAND_STATUS = %w( AcademicLiterature ISOStandard Unofficial W3CRecommendation W3CTeamSubmission W3CWorkingGroupNote )
DEFINED_BY = %w( registry )
validates_uniqueness_of :iri, if: :iri_changed?
}
def to_s
name
end
def add_logic(logic)
sup = self.supports.new
sup.logic = logic
sup.save!
end
def mappings_from
LanguageMapping.find_all_by_source_id self.id
end
def mappings_to
LanguageMapping.find_all_by_target_id self.id
end
private
def add_permission
permissions.create! :subject => self.user, :role => 'owner' if self.user
end
end