relates definitions

This commit is contained in:
Andrew Brown 2018-01-30 22:36:00 -06:00
parent 346f2839be
commit 9f000bb7c0
4 changed files with 45 additions and 4 deletions

View File

@ -1,4 +1,3 @@
class Deity < ActiveRecord::Base
acts_as_paranoid
@ -17,6 +16,20 @@ class Deity < ActiveRecord::Base
include Authority::Abilities
self.authorizer_name = 'ExtendedContentAuthorizer'
relates :character_parents, with: :deity_character_parents
relates :character_partners, with: :deity_character_partners
relates :character_children, with: :deity_character_children
relates :deity_parents, with: :deity_deity_parents
relates :deity_partners, with: :deity_deity_partners
relates :deity_children, with: :deity_deity_children
relates :creatures, with: :deity_creatures
relates :floras, with: :deity_floras
relates :religions, with: :deity_religions
relates :relics, with: :deity_relics
relates :abilities, with: :deity_abilities
relates :related_towns, with: :deity_related_towns
relates :related_landmarks, with: :deity_related_landmarks
def self.color
'text-lighten-1 grey'
end

View File

@ -1,4 +1,3 @@
class Government < ActiveRecord::Base
acts_as_paranoid
@ -17,6 +16,13 @@ class Government < ActiveRecord::Base
include Authority::Abilities
self.authorizer_name = 'ExtendedContentAuthorizer'
relates :leaders, with: :government_leaders
relates :groups, with: :government_groups
relates :political_figures, with: :government_political_figures
relates :items, with: :government_items
relates :technologies, with: :government_technologies
relates :creatures, with: :government_creatures
def self.color
'darken-2 green'
end

View File

@ -1,4 +1,3 @@
class Planet < ActiveRecord::Base
acts_as_paranoid
@ -17,6 +16,19 @@ class Planet < ActiveRecord::Base
include Authority::Abilities
self.authorizer_name = 'ExtendedContentAuthorizer'
relates :countries, with: :planet_countries
relates :locations, with: :planet_locations
relates :landmarks, with: :planet_landmarks
relates :races, with: :planet_races
relates :floras, with: :planet_floras
relates :creatures, with: :planet_creatures
relates :religions, with: :planet_religions
relates :deities, with: :planet_deities
relates :groups, with: :planet_groups
relates :languages, with: :planet_languages
relates :towns, with: :planet_towns
relates :nearby_planets, with: :planet_nearby_planets
def self.color
'text-lighten-2 blue'
end

View File

@ -1,4 +1,3 @@
class Technology < ActiveRecord::Base
acts_as_paranoid
@ -17,6 +16,17 @@ class Technology < ActiveRecord::Base
include Authority::Abilities
self.authorizer_name = 'ExtendedContentAuthorizer'
relates :characters, with: :technology_characters
relates :towns, with: :technology_towns
relates :countries, with: :technology_countries
relates :groups, with: :technology_groups
relates :creatures, with: :technology_creatures
relates :planets, with: :technology_planets
relates :magics, with: :technology_magics
relates :parent_technologies, with: :technology_parent_technologies
relates :child_technologies, with: :technology_child_technologies
relates :related_technologies, with: :technology_related_technologies
def self.color
'text-darken-2 red'
end