diff --git a/app/assets/images/card-headers/.DS_Store b/app/assets/images/card-headers/.DS_Store new file mode 100644 index 00000000..5008ddfc Binary files /dev/null and b/app/assets/images/card-headers/.DS_Store differ diff --git a/app/assets/images/card-headers/deities.jpg b/app/assets/images/card-headers/deities.jpg new file mode 100644 index 00000000..a5778dc9 Binary files /dev/null and b/app/assets/images/card-headers/deities.jpg differ diff --git a/app/assets/images/card-headers/governments.jpg b/app/assets/images/card-headers/governments.jpg new file mode 100644 index 00000000..ea3368e3 Binary files /dev/null and b/app/assets/images/card-headers/governments.jpg differ diff --git a/app/assets/images/card-headers/planets.jpg b/app/assets/images/card-headers/planets.jpg new file mode 100644 index 00000000..c3adb478 Binary files /dev/null and b/app/assets/images/card-headers/planets.jpg differ diff --git a/app/assets/images/card-headers/technologies.jpg b/app/assets/images/card-headers/technologies.jpg new file mode 100644 index 00000000..be892888 Binary files /dev/null and b/app/assets/images/card-headers/technologies.jpg differ diff --git a/app/controllers/characters_controller.rb b/app/controllers/characters_controller.rb index f9962afd..5369b790 100644 --- a/app/controllers/characters_controller.rb +++ b/app/controllers/characters_controller.rb @@ -28,7 +28,15 @@ class CharactersController < ContentController birthings_attributes: [:id, :birthplace_id, :_destroy], childrenships_attributes: [:id, :child_id, :_destroy], lingualisms_attributes: [:id, :spoken_language_id, :_destroy], - raceships_attributes: [:id, :race_id, :_destroy] + raceships_attributes: [:id, :race_id, :_destroy], + character_items_attributes: [:id, :item_id, :_destroy], + character_technologies_attributes: [:id, :technology_id, :_destroy], + character_floras_attributes: [:id, :flora_id, :_destroy], + character_friends_attributes: [:id, :friend_id, :_destroy], + character_companions_attributes: [:id, :companion_id, :_destroy], + character_birthtowns_attributes: [:id, :birthtown_id, :_destroy], + character_magics_attributes: [:id, :magic_id, :_destroy], + character_enemies_attributes: [:id, :enemy_id, :_destroy] ] end end diff --git a/app/controllers/countries_controller.rb b/app/controllers/countries_controller.rb index bca6dfed..ad12ea4d 100644 --- a/app/controllers/countries_controller.rb +++ b/app/controllers/countries_controller.rb @@ -17,7 +17,8 @@ class CountriesController < ContentController country_religions_attributes: [:id, :religion_id, :_destroy], country_landmarks_attributes: [:id, :landmark_id, :_destroy], country_creatures_attributes: [:id, :creature_id, :_destroy], - country_floras_attributes: [:id, :flora_id, :_destroy] + country_floras_attributes: [:id, :flora_id, :_destroy], + country_governments_attributes: [:id, :government_id, :_destroy] ] end end diff --git a/app/controllers/creatures_controller.rb b/app/controllers/creatures_controller.rb index b3b75fd6..d6260b3f 100644 --- a/app/controllers/creatures_controller.rb +++ b/app/controllers/creatures_controller.rb @@ -1,10 +1,6 @@ class CreaturesController < ContentController private - def content_params - params.require(:creature).permit(content_param_list) - end - def content_param_list %i( name description type_of other_names universe_id color shape size notable_features @@ -12,6 +8,7 @@ class CreaturesController < ContentController attack_method defense_method maximum_speed food_sources migratory_patterns reproduction herd_patterns similar_animals symbolisms privacy notes private_notes + phylum class_string order family genus species ) + [ custom_attribute_values: [:name, :value], wildlifeships_attributes: [:id, :habitat_id, :_destroy], diff --git a/app/controllers/deities_controller.rb b/app/controllers/deities_controller.rb new file mode 100644 index 00000000..c9d8ab54 --- /dev/null +++ b/app/controllers/deities_controller.rb @@ -0,0 +1,27 @@ + +class DeitiesController < ContentController + private + + def content_param_list + [ + :name, :description, :other_names, :physical_description, :height, + :weight, :symbols, :elements, :strengths, :weaknesses, :prayers, :rituals, + :human_interaction, :notable_events, :family_history, :life_story, :notes, + :private_notes, :privacy, :universe_id + ] + [ + deity_character_parents_attributes: [:id, :character_parent_id, :_destroy], + deity_character_partners_attributes: [:id, :character_partner_id, :_destroy], + deity_character_children_attributes: [:id, :character_child_id, :_destroy], + deity_deity_parents_attributes: [:id, :deity_parent_id, :_destroy], + deity_deity_partners_attributes: [:id, :deity_partner_id, :_destroy], + deity_deity_children_attributes: [:id, :deity_child_id, :_destroy], + deity_creatures_attributes: [:id, :creature_id, :_destroy], + deity_floras_attributes: [:id, :flora_id, :_destroy], + deity_religions_attributes: [:id, :religion_id, :_destroy], + deity_relics_attributes: [:id, :relic_id, :_destroy], + deity_abilities_attributes: [:id, :ability_id, :_destroy], + deity_related_towns_attributes: [:id, :related_town_id, :_destroy], + deity_related_landmarks_attributes: [:id, :related_landmark_id, :_destroy] + ] + end +end diff --git a/app/controllers/export_controller.rb b/app/controllers/export_controller.rb index 5fdd4688..aadfa529 100644 --- a/app/controllers/export_controller.rb +++ b/app/controllers/export_controller.rb @@ -1,5 +1,6 @@ class ExportController < ApplicationController before_action :authenticate_user! + before_action :whitelist_pluralized_model, only: [:csv] def index Mixpanel::Tracker.new(Rails.application.config.mixpanel_token).track(current_user.id, 'viewed export page', { @@ -14,81 +15,9 @@ class ExportController < ApplicationController }) if Rails.env.production? end - # Formats - - def universes_csv - report_to_mixpanel 'csv', 'universes' - send_data to_csv(current_user.universes), filename: "universes-#{Date.today}.csv" - end - - def characters_csv - report_to_mixpanel 'csv', 'characters' - send_data to_csv(current_user.characters), filename: "characters-#{Date.today}.csv" - end - - def locations_csv - report_to_mixpanel 'csv', 'locations' - send_data to_csv(current_user.locations), filename: "locations-#{Date.today}.csv" - end - - def items_csv - report_to_mixpanel 'csv', 'items' - send_data to_csv(current_user.items), filename: "items-#{Date.today}.csv" - end - - def creatures_csv - report_to_mixpanel 'csv', 'creatures' - send_data to_csv(current_user.creatures), filename: "creatures-#{Date.today}.csv" - end - - def races_csv - report_to_mixpanel 'csv', 'races' - send_data to_csv(current_user.races), filename: "races-#{Date.today}.csv" - end - - def floras_csv - report_to_mixpanel 'csv', 'flora' - send_data to_csv(current_user.floras), filename: "floras-#{Date.today}.csv" - end - - def religions_csv - report_to_mixpanel 'csv', 'religions' - send_data to_csv(current_user.religions), filename: "religions-#{Date.today}.csv" - end - - def magics_csv - report_to_mixpanel 'csv', 'magics' - send_data to_csv(current_user.magics), filename: "magics-#{Date.today}.csv" - end - - def languages_csv - report_to_mixpanel 'csv', 'languages' - send_data to_csv(current_user.languages), filename: "languages-#{Date.today}.csv" - end - - def groups_csv - report_to_mixpanel 'csv', 'groups' - send_data to_csv(current_user.groups), filename: "groups-#{Date.today}.csv" - end - - def towns_csv - report_to_mixpanel 'csv', 'towns' - send_data to_csv(current_user.towns), filename: "towns-#{Date.today}.csv" - end - - def landmarks_csv - report_to_mixpanel 'csv', 'landmarks' - send_data to_csv(current_user.landmarks), filename: "landmarks-#{Date.today}.csv" - end - - def countries_csv - report_to_mixpanel 'csv', 'countries' - send_data to_csv(current_user.countries), filename: "countries-#{Date.today}.csv" - end - - def scenes_csv - report_to_mixpanel 'csv', 'scenes' - send_data to_csv(current_user.scenes), filename: "scenes-#{Date.today}.csv" + def csv # params[:model] needed + report_to_mixpanel 'csv', @pluralized_model + send_data to_csv(current_user.send(@pluralized_model)), filename: "#{@pluralized_model}-#{Date.today}.csv" end def outline @@ -119,6 +48,16 @@ class ExportController < ApplicationController private + def whitelist_pluralized_model + @pluralized_model = params[:model] + valid_models_to_export = Rails.application.config.content_types[:all].map { |p| p.name.downcase.pluralize } + + unless valid_models_to_export.include?(@pluralized_model) + redirect_to root_path, notice: "You don't have permission to do that!" + return false + end + end + def to_csv ar_relation ar_class = ar_relation.build.class attribute_categories = ar_class.attribute_categories(current_user) diff --git a/app/controllers/floras_controller.rb b/app/controllers/floras_controller.rb index 243c9a00..230ba052 100644 --- a/app/controllers/floras_controller.rb +++ b/app/controllers/floras_controller.rb @@ -10,7 +10,7 @@ class FlorasController < ContentController name description aliases universe_id order family genus colorings size smell taste - fruits seeds nuts berries medicinal_purposes + fruits seeds nuts berries medicinal_purposes material_uses reproduction seasonality privacy notes private_notes diff --git a/app/controllers/governments_controller.rb b/app/controllers/governments_controller.rb new file mode 100644 index 00000000..ef1ad89e --- /dev/null +++ b/app/controllers/governments_controller.rb @@ -0,0 +1,23 @@ + +class GovernmentsController < ContentController + private + + def content_param_list + [ + :name, :description, :type_of_government, :power_structure, :power_source, + :checks_and_balances, :sociopolitical, :socioeconomical, :geocultural, + :laws, :immigration, :privacy_ideologies, :electoral_process, + :term_lengths, :criminal_system, :approval_ratings, :military, :navy, + :airforce, :space_program, :international_relations, :civilian_life, + :founding_story, :flag_design_story, :notable_wars, :notes, + :private_notes, :privacy, :universe_id + ] + [ # + government_leaders_attributes: [:id, :leader_id, :_destroy], + government_groups_attributes: [:id, :group_id, :_destroy], + government_political_figures_attributes: [:id, :political_figure_id, :_destroy], + government_items_attributes: [:id, :item_id, :_destroy], + government_technologies_attributes: [:id, :technology_id, :_destroy], + government_creatures_attributes: [:id, :creature_id, :_destroy] + ] + end +end diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index cf372e48..6147896b 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -28,6 +28,7 @@ class GroupsController < ContentController officeships_attributes: [:id, :office_id, :_destroy], group_equipmentships_attributes: [:id, :equipment_id, :_destroy], key_itemships_attributes: [:id, :key_item_id, :_destroy], + group_creatures_attributes: [:id, :creature_id, :_destroy] ] end end diff --git a/app/controllers/items_controller.rb b/app/controllers/items_controller.rb index 2a94b611..7338ca5f 100644 --- a/app/controllers/items_controller.rb +++ b/app/controllers/items_controller.rb @@ -21,6 +21,7 @@ class ItemsController < ContentController current_ownerships_attributes: [:id, :current_owner_id, :_destroy], past_ownerships_attributes: [:id, :past_owner_id, :_destroy], maker_relationships_attributes: [:id, :maker_id, :_destroy], + item_magics_attributes: [:id, :magic_id, :_destroy], ] end end diff --git a/app/controllers/locations_controller.rb b/app/controllers/locations_controller.rb index 271f8f5e..a9a9f0be 100644 --- a/app/controllers/locations_controller.rb +++ b/app/controllers/locations_controller.rb @@ -23,7 +23,11 @@ class LocationsController < ContentController capital_cities_relationships_attributes: [:id, :capital_city_id, :_destroy], largest_cities_relationships_attributes: [:id, :largest_city_id, :_destroy], notable_cities_relationships_attributes: [:id, :notable_city_id, :_destroy], - location_languageships_attributes: [:id, :language_id, :_destroy] + location_languageships_attributes: [:id, :language_id, :_destroy], + location_capital_towns_attributes: [:id, :capital_town_id, :_destroy], + location_largest_towns_attributes: [:id, :largest_town_id, :_destroy], + location_notable_towns_attributes: [:id, :notable_town_id, :_destroy], + location_landmarks_attributes: [:id, :landmark_id, :_destroy] ] end end diff --git a/app/controllers/magics_controller.rb b/app/controllers/magics_controller.rb index df04fa18..943b563e 100644 --- a/app/controllers/magics_controller.rb +++ b/app/controllers/magics_controller.rb @@ -1,10 +1,6 @@ class MagicsController < ContentController private - def content_params - params.require(:magic).permit(content_param_list) - end - def content_param_list %i( name description type_of universe_id visuals effects positive_effects diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb index 5dea89eb..419bed6b 100644 --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -22,7 +22,10 @@ class MainController < ApplicationController def dashboard return redirect_to new_user_session_path unless user_signed_in? - @content_types = current_user.user_content_type_activators.pluck(:content_type) + @content_types = ( + Rails.application.config.content_types[:all].map(&:name) & # Use config to dictate order + current_user.user_content_type_activators.pluck(:content_type) + ) ask_question end diff --git a/app/controllers/planets_controller.rb b/app/controllers/planets_controller.rb new file mode 100644 index 00000000..8a355609 --- /dev/null +++ b/app/controllers/planets_controller.rb @@ -0,0 +1,31 @@ + +class PlanetsController < ContentController + private + + def content_param_list + [ + :name, :description, :size, :surface, :landmarks, :climate, :weather, + :water_content, :natural_resources, :length_of_day, :length_of_night, + :calendar_system, :population, :moons, :orbit, :visible_constellations, + :first_inhabitants_story, :world_history, :public_notes, :private_notes, + :privacy, :universe_id + ] + [ + #todo refactor all models to use: + # self.class.relates.map do |relation| + # #{with_relation}_attributes: [:id, :#{relates_relation.singularize}_id, :_destroy] + # end + planet_countries_attributes: [:id, :country_id, :_destroy], + planet_locations_attributes: [:id, :location_id, :_destroy], + planet_landmarks_attributes: [:id, :landmark_id, :_destroy], + planet_races_attributes: [:id, :race_id, :_destroy], + planet_floras_attributes: [:id, :flora_id, :_destroy], + planet_creatures_attributes: [:id, :creature_id, :_destroy], + planet_religions_attributes: [:id, :religion_id, :_destroy], + planet_deities_attributes: [:id, :deity_id, :_destroy], + planet_groups_attributes: [:id, :group_id, :_destroy], + planet_languages_attributes: [:id, :language_id, :_destroy], + planet_towns_attributes: [:id, :town_id, :_destroy], + planet_nearby_planets_attributes: [:id, :nearby_planet_id, :_destroy] + ] + end +end diff --git a/app/controllers/races_controller.rb b/app/controllers/races_controller.rb index d1169585..c6aa3f2a 100644 --- a/app/controllers/races_controller.rb +++ b/app/controllers/races_controller.rb @@ -1,10 +1,6 @@ class RacesController < ContentController private - def content_params - params.require(:race).permit(content_param_list) - end - def content_param_list %i( name description other_names universe_id diff --git a/app/controllers/religions_controller.rb b/app/controllers/religions_controller.rb index 18d98b72..548f04f4 100644 --- a/app/controllers/religions_controller.rb +++ b/app/controllers/religions_controller.rb @@ -1,10 +1,6 @@ class ReligionsController < ContentController private - def content_params - params.require(:religion).permit(content_param_list) - end - def content_param_list %i( name description other_names universe_id diff --git a/app/controllers/scenes_controller.rb b/app/controllers/scenes_controller.rb index 2c5315a0..07374b3d 100644 --- a/app/controllers/scenes_controller.rb +++ b/app/controllers/scenes_controller.rb @@ -1,10 +1,6 @@ class ScenesController < ContentController private - def content_params - params.require(:scene).permit(content_param_list) - end - def content_param_list %i( name summary universe_id diff --git a/app/controllers/technologies_controller.rb b/app/controllers/technologies_controller.rb new file mode 100644 index 00000000..a6b9c18f --- /dev/null +++ b/app/controllers/technologies_controller.rb @@ -0,0 +1,24 @@ + +class TechnologiesController < ContentController + private + + def content_param_list + [ + :name, :description, :other_names, :materials, :manufacturing_process, + :sales_process, :cost, :rarity, :purpose, :how_it_works, :resources_used, + :physical_description, :size, :weight, :colors, :notes, :private_notes, + :privacy, :universe_id + ] + [ # + technology_characters_attributes: [:id, :character_id, :_destroy], + technology_towns_attributes: [:id, :town_id, :_destroy], + technology_countries_attributes: [:id, :country_id, :_destroy], + technology_groups_attributes: [:id, :group_id, :_destroy], + technology_creatures_attributes: [:id, :creature_id, :_destroy], + technology_planets_attributes: [:id, :planet_id, :_destroy], + technology_magics_attributes: [:id, :magic_id, :_destroy], + technology_parent_technologies_attributes: [:id, :parent_technology_id, :_destroy], + technology_child_technologies_attributes: [:id, :child_technology_id, :_destroy], + technology_related_technologies_attributes: [:id, :related_technology_id, :_destroy] + ] + end +end diff --git a/app/controllers/universes_controller.rb b/app/controllers/universes_controller.rb index b261041e..bdcbb810 100644 --- a/app/controllers/universes_controller.rb +++ b/app/controllers/universes_controller.rb @@ -1,14 +1,20 @@ class UniversesController < ContentController # TODO: pull list of content types out from some centralized list somewhere - [ - :characters, :locations, :items, :creatures, :races, :religions, :groups, :magics, :languages, :floras, :scenes - ].each do |content_type_name| + Rails.application.config.content_types[:all_non_universe].each do |content_type| + content_type_name = content_type.name.downcase.pluralize.to_sym define_method content_type_name do @content_type = content_type_name.to_s.singularize.capitalize.constantize @universe = Universe.find(params[:id]) - @content_list = @universe.send(content_type_name).is_public.order(:name) + @content_list = @universe.send(content_type_name) + + # todo just use current_user.can_view?(@universe) and/or individual filtering + unless user_signed_in? && (current_user == @universe.user || Contributor.exists?(user_id: current_user.id, universe_id: @universe.id)) + @content_list = @content_list.is_public + end + + @content_list = @content_list.order(:name) render :content_list end @@ -24,7 +30,7 @@ class UniversesController < ContentController [ :user_id, :name, :description, :genre, - :laws_of_physics, :magic_system, :technologies, + :laws_of_physics, :magic_system, :technology, :history, :privacy, :notes, :private_notes, diff --git a/app/models/concerns/has_content_groupers.rb b/app/models/concerns/has_content_groupers.rb index d5b18521..94222a43 100644 --- a/app/models/concerns/has_content_groupers.rb +++ b/app/models/concerns/has_content_groupers.rb @@ -4,8 +4,6 @@ module HasContentGroupers extend ActiveSupport::Concern included do - @@relations = {} - # Example: # relates :siblings, with: :siblingships, where: { alive: true }, type: :two_way # Defines :siblings and :siblingships relations, their inverses, and accepts_nested_attributes for siblingships @@ -14,12 +12,32 @@ module HasContentGroupers connecting_class = with.to_s.singularize.camelize.constantize connecting_class_name = with - # Store all added relations on the class model, so we can dynamically fetch them all whenever needed. - # e.g. Character.class_variable_get(:@@relations) => [:mothers, :fathers, :siblings, ...] - @@relations[relation] = { # @@relations[:siblings] = { - with: with, # with: :siblingships, - related_class: connecting_class # related_class: Siblingship - } # } + # Fetch the connecting class's through class (e.g. Character for sibling_id). + # If there isn't one defined, it means it already maps to a model (e.g. race_id), + # so we can use the name as the class as well. + belongs_to_relations = connecting_class.reflect_on_all_associations(:belongs_to) + through_relation = belongs_to_relations.detect do |relation| # sibling + relation.name.to_s == singularized_relation + end + if through_relation.options.key?(:class_name) + through_relation_class = through_relation.options[:class_name] # Character + else + through_relation_class = through_relation.name.to_s.titleize # Character + end + + # Store all added relations on the config object, so we can dynamically + # fetch them all whenever needed. These are used to find all relations + # where a particular page is the target of a content_grouper, rather than + # the parent (e.g. one of its has_many's). + Rails.application.config.content_relations[through_relation_class] ||= {} + Rails.application.config.content_relations[through_relation_class][connecting_class.name] = \ + { # ['Character'][:siblings] = { + with: with, # with: :siblingships, + related_class: connecting_class, # related_class: Siblingship, + inverse_class: name, # inverse_class: 'Character', + relation_text: singularized_relation, # relation_text: "Sibling" + through_relation: singularized_relation # through_relation: 'Sibling' + } # } # Siblingships has_many connecting_class_name, dependent: :destroy diff --git a/app/models/content_groupers/character_birthtown.rb b/app/models/content_groupers/character_birthtown.rb new file mode 100644 index 00000000..2359f56b --- /dev/null +++ b/app/models/content_groupers/character_birthtown.rb @@ -0,0 +1,5 @@ +class CharacterBirthtown < ActiveRecord::Base + belongs_to :user + belongs_to :character + belongs_to :birthtown, class_name: Town.name +end diff --git a/app/models/content_groupers/character_companion.rb b/app/models/content_groupers/character_companion.rb new file mode 100644 index 00000000..829dca6e --- /dev/null +++ b/app/models/content_groupers/character_companion.rb @@ -0,0 +1,5 @@ +class CharacterCompanion < ActiveRecord::Base + belongs_to :user + belongs_to :character + belongs_to :companion, class_name: Creature.name +end diff --git a/app/models/content_groupers/character_enemy.rb b/app/models/content_groupers/character_enemy.rb new file mode 100644 index 00000000..6327e7f2 --- /dev/null +++ b/app/models/content_groupers/character_enemy.rb @@ -0,0 +1,5 @@ +class CharacterEnemy < ActiveRecord::Base + belongs_to :character + belongs_to :user + belongs_to :enemy, class_name: Character.name +end diff --git a/app/models/content_groupers/character_flora.rb b/app/models/content_groupers/character_flora.rb new file mode 100644 index 00000000..c951f513 --- /dev/null +++ b/app/models/content_groupers/character_flora.rb @@ -0,0 +1,5 @@ +class CharacterFlora < ActiveRecord::Base + belongs_to :user + belongs_to :character + belongs_to :flora +end diff --git a/app/models/content_groupers/character_friend.rb b/app/models/content_groupers/character_friend.rb new file mode 100644 index 00000000..4e886fde --- /dev/null +++ b/app/models/content_groupers/character_friend.rb @@ -0,0 +1,5 @@ +class CharacterFriend < ActiveRecord::Base + belongs_to :user + belongs_to :character + belongs_to :friend, class_name: Character.name +end diff --git a/app/models/content_groupers/character_item.rb b/app/models/content_groupers/character_item.rb new file mode 100644 index 00000000..14e682bd --- /dev/null +++ b/app/models/content_groupers/character_item.rb @@ -0,0 +1,5 @@ +class CharacterItem < ActiveRecord::Base + belongs_to :user + belongs_to :character + belongs_to :item +end diff --git a/app/models/content_groupers/character_magic.rb b/app/models/content_groupers/character_magic.rb new file mode 100644 index 00000000..c0c22c27 --- /dev/null +++ b/app/models/content_groupers/character_magic.rb @@ -0,0 +1,5 @@ +class CharacterMagic < ActiveRecord::Base + belongs_to :character + belongs_to :magic + belongs_to :user +end diff --git a/app/models/content_groupers/character_technology.rb b/app/models/content_groupers/character_technology.rb new file mode 100644 index 00000000..19d6f56d --- /dev/null +++ b/app/models/content_groupers/character_technology.rb @@ -0,0 +1,5 @@ +class CharacterTechnology < ActiveRecord::Base + belongs_to :user + belongs_to :character + belongs_to :technology +end diff --git a/app/models/content_groupers/country_government.rb b/app/models/content_groupers/country_government.rb new file mode 100644 index 00000000..292080d9 --- /dev/null +++ b/app/models/content_groupers/country_government.rb @@ -0,0 +1,5 @@ +class CountryGovernment < ActiveRecord::Base + belongs_to :country + belongs_to :government + belongs_to :user +end diff --git a/app/models/content_groupers/deity_ability.rb b/app/models/content_groupers/deity_ability.rb new file mode 100644 index 00000000..d5724fce --- /dev/null +++ b/app/models/content_groupers/deity_ability.rb @@ -0,0 +1,5 @@ +class DeityAbility < ActiveRecord::Base + belongs_to :user + belongs_to :deity + belongs_to :ability, class_name: Magic.name +end diff --git a/app/models/content_groupers/deity_character_child.rb b/app/models/content_groupers/deity_character_child.rb new file mode 100644 index 00000000..8df10efc --- /dev/null +++ b/app/models/content_groupers/deity_character_child.rb @@ -0,0 +1,5 @@ +class DeityCharacterChild < ActiveRecord::Base + belongs_to :user + belongs_to :deity + belongs_to :character_child, class_name: Character.name +end diff --git a/app/models/content_groupers/deity_character_parent.rb b/app/models/content_groupers/deity_character_parent.rb new file mode 100644 index 00000000..ae662898 --- /dev/null +++ b/app/models/content_groupers/deity_character_parent.rb @@ -0,0 +1,5 @@ +class DeityCharacterParent < ActiveRecord::Base + belongs_to :user + belongs_to :deity + belongs_to :character_parent, class_name: Character.name +end diff --git a/app/models/content_groupers/deity_character_partner.rb b/app/models/content_groupers/deity_character_partner.rb new file mode 100644 index 00000000..47d47730 --- /dev/null +++ b/app/models/content_groupers/deity_character_partner.rb @@ -0,0 +1,5 @@ +class DeityCharacterPartner < ActiveRecord::Base + belongs_to :user + belongs_to :deity + belongs_to :character_partner, class_name: Character.name +end diff --git a/app/models/content_groupers/deity_creature.rb b/app/models/content_groupers/deity_creature.rb new file mode 100644 index 00000000..172c48d0 --- /dev/null +++ b/app/models/content_groupers/deity_creature.rb @@ -0,0 +1,5 @@ +class DeityCreature < ActiveRecord::Base + belongs_to :user + belongs_to :deity + belongs_to :creature +end diff --git a/app/models/content_groupers/deity_deity_child.rb b/app/models/content_groupers/deity_deity_child.rb new file mode 100644 index 00000000..019ed836 --- /dev/null +++ b/app/models/content_groupers/deity_deity_child.rb @@ -0,0 +1,5 @@ +class DeityDeityChild < ActiveRecord::Base + belongs_to :user + belongs_to :deity + belongs_to :deity_child, class_name: Deity.name +end diff --git a/app/models/content_groupers/deity_deity_parent.rb b/app/models/content_groupers/deity_deity_parent.rb new file mode 100644 index 00000000..22ea357f --- /dev/null +++ b/app/models/content_groupers/deity_deity_parent.rb @@ -0,0 +1,5 @@ +class DeityDeityParent < ActiveRecord::Base + belongs_to :user + belongs_to :deity + belongs_to :deity_parent, class_name: Deity.name +end diff --git a/app/models/content_groupers/deity_deity_partner.rb b/app/models/content_groupers/deity_deity_partner.rb new file mode 100644 index 00000000..7094886b --- /dev/null +++ b/app/models/content_groupers/deity_deity_partner.rb @@ -0,0 +1,5 @@ +class DeityDeityPartner < ActiveRecord::Base + belongs_to :user + belongs_to :deity + belongs_to :deity_partner, class_name: Deity.name +end diff --git a/app/models/content_groupers/deity_flora.rb b/app/models/content_groupers/deity_flora.rb new file mode 100644 index 00000000..73b8cc78 --- /dev/null +++ b/app/models/content_groupers/deity_flora.rb @@ -0,0 +1,5 @@ +class DeityFlora < ActiveRecord::Base + belongs_to :user + belongs_to :deity + belongs_to :flora +end diff --git a/app/models/content_groupers/deity_related_landmark.rb b/app/models/content_groupers/deity_related_landmark.rb new file mode 100644 index 00000000..b7eef19a --- /dev/null +++ b/app/models/content_groupers/deity_related_landmark.rb @@ -0,0 +1,5 @@ +class DeityRelatedLandmark < ActiveRecord::Base + belongs_to :user + belongs_to :deity + belongs_to :related_landmark, class_name: Landmark.name +end diff --git a/app/models/content_groupers/deity_related_town.rb b/app/models/content_groupers/deity_related_town.rb new file mode 100644 index 00000000..a4486996 --- /dev/null +++ b/app/models/content_groupers/deity_related_town.rb @@ -0,0 +1,5 @@ +class DeityRelatedTown < ActiveRecord::Base + belongs_to :user + belongs_to :deity + belongs_to :related_town, class_name: Town.name +end diff --git a/app/models/content_groupers/deity_relic.rb b/app/models/content_groupers/deity_relic.rb new file mode 100644 index 00000000..ff7ded48 --- /dev/null +++ b/app/models/content_groupers/deity_relic.rb @@ -0,0 +1,5 @@ +class DeityRelic < ActiveRecord::Base + belongs_to :user + belongs_to :deity + belongs_to :relic, class_name: Item.name +end diff --git a/app/models/content_groupers/deity_religion.rb b/app/models/content_groupers/deity_religion.rb new file mode 100644 index 00000000..55ea56bb --- /dev/null +++ b/app/models/content_groupers/deity_religion.rb @@ -0,0 +1,5 @@ +class DeityReligion < ActiveRecord::Base + belongs_to :user + belongs_to :deity + belongs_to :religion +end diff --git a/app/models/content_groupers/government_creature.rb b/app/models/content_groupers/government_creature.rb new file mode 100644 index 00000000..ecf5a000 --- /dev/null +++ b/app/models/content_groupers/government_creature.rb @@ -0,0 +1,5 @@ +class GovernmentCreature < ActiveRecord::Base + belongs_to :user + belongs_to :government + belongs_to :creature +end diff --git a/app/models/content_groupers/government_group.rb b/app/models/content_groupers/government_group.rb new file mode 100644 index 00000000..5d7644e4 --- /dev/null +++ b/app/models/content_groupers/government_group.rb @@ -0,0 +1,5 @@ +class GovernmentGroup < ActiveRecord::Base + belongs_to :user + belongs_to :government + belongs_to :group +end diff --git a/app/models/content_groupers/government_item.rb b/app/models/content_groupers/government_item.rb new file mode 100644 index 00000000..4b679556 --- /dev/null +++ b/app/models/content_groupers/government_item.rb @@ -0,0 +1,5 @@ +class GovernmentItem < ActiveRecord::Base + belongs_to :user + belongs_to :government + belongs_to :item +end diff --git a/app/models/content_groupers/government_leader.rb b/app/models/content_groupers/government_leader.rb new file mode 100644 index 00000000..1bffb351 --- /dev/null +++ b/app/models/content_groupers/government_leader.rb @@ -0,0 +1,5 @@ +class GovernmentLeader < ActiveRecord::Base + belongs_to :user + belongs_to :government + belongs_to :leader, class_name: Character.name +end diff --git a/app/models/content_groupers/government_political_figure.rb b/app/models/content_groupers/government_political_figure.rb new file mode 100644 index 00000000..2c58d0ef --- /dev/null +++ b/app/models/content_groupers/government_political_figure.rb @@ -0,0 +1,5 @@ +class GovernmentPoliticalFigure < ActiveRecord::Base + belongs_to :user + belongs_to :government + belongs_to :political_figure, class_name: Character.name +end diff --git a/app/models/content_groupers/government_technology.rb b/app/models/content_groupers/government_technology.rb new file mode 100644 index 00000000..86e72782 --- /dev/null +++ b/app/models/content_groupers/government_technology.rb @@ -0,0 +1,5 @@ +class GovernmentTechnology < ActiveRecord::Base + belongs_to :user + belongs_to :government + belongs_to :technology +end diff --git a/app/models/content_groupers/group_creature.rb b/app/models/content_groupers/group_creature.rb new file mode 100644 index 00000000..2e5d306b --- /dev/null +++ b/app/models/content_groupers/group_creature.rb @@ -0,0 +1,5 @@ +class GroupCreature < ActiveRecord::Base + belongs_to :group + belongs_to :creature + belongs_to :user +end diff --git a/app/models/content_groupers/item_magic.rb b/app/models/content_groupers/item_magic.rb new file mode 100644 index 00000000..aee842d1 --- /dev/null +++ b/app/models/content_groupers/item_magic.rb @@ -0,0 +1,5 @@ +class ItemMagic < ActiveRecord::Base + belongs_to :item + belongs_to :magic + belongs_to :user +end diff --git a/app/models/content_groupers/location_capital_town.rb b/app/models/content_groupers/location_capital_town.rb new file mode 100644 index 00000000..e0393c98 --- /dev/null +++ b/app/models/content_groupers/location_capital_town.rb @@ -0,0 +1,5 @@ +class LocationCapitalTown < ActiveRecord::Base + belongs_to :location + belongs_to :user + belongs_to :capital_town, class_name: Town.name +end diff --git a/app/models/content_groupers/location_landmark.rb b/app/models/content_groupers/location_landmark.rb new file mode 100644 index 00000000..d62b103b --- /dev/null +++ b/app/models/content_groupers/location_landmark.rb @@ -0,0 +1,5 @@ +class LocationLandmark < ActiveRecord::Base + belongs_to :location + belongs_to :landmark + belongs_to :user +end diff --git a/app/models/content_groupers/location_largest_town.rb b/app/models/content_groupers/location_largest_town.rb new file mode 100644 index 00000000..ac2d6b5a --- /dev/null +++ b/app/models/content_groupers/location_largest_town.rb @@ -0,0 +1,5 @@ +class LocationLargestTown < ActiveRecord::Base + belongs_to :location + belongs_to :user + belongs_to :largest_town, class_name: Town.name +end diff --git a/app/models/content_groupers/location_notable_town.rb b/app/models/content_groupers/location_notable_town.rb new file mode 100644 index 00000000..ee920dcc --- /dev/null +++ b/app/models/content_groupers/location_notable_town.rb @@ -0,0 +1,5 @@ +class LocationNotableTown < ActiveRecord::Base + belongs_to :location + belongs_to :user + belongs_to :notable_town, class_name: Town.name +end diff --git a/app/models/content_groupers/planet_country.rb b/app/models/content_groupers/planet_country.rb new file mode 100644 index 00000000..2b1688ab --- /dev/null +++ b/app/models/content_groupers/planet_country.rb @@ -0,0 +1,5 @@ +class PlanetCountry < ActiveRecord::Base + belongs_to :user + belongs_to :planet + belongs_to :country +end diff --git a/app/models/content_groupers/planet_creature.rb b/app/models/content_groupers/planet_creature.rb new file mode 100644 index 00000000..12632e46 --- /dev/null +++ b/app/models/content_groupers/planet_creature.rb @@ -0,0 +1,5 @@ +class PlanetCreature < ActiveRecord::Base + belongs_to :user + belongs_to :planet + belongs_to :creature +end diff --git a/app/models/content_groupers/planet_deity.rb b/app/models/content_groupers/planet_deity.rb new file mode 100644 index 00000000..c3e1d61e --- /dev/null +++ b/app/models/content_groupers/planet_deity.rb @@ -0,0 +1,5 @@ +class PlanetDeity < ActiveRecord::Base + belongs_to :user + belongs_to :planet + belongs_to :deity +end diff --git a/app/models/content_groupers/planet_flora.rb b/app/models/content_groupers/planet_flora.rb new file mode 100644 index 00000000..e8aba8ba --- /dev/null +++ b/app/models/content_groupers/planet_flora.rb @@ -0,0 +1,5 @@ +class PlanetFlora < ActiveRecord::Base + belongs_to :user + belongs_to :planet + belongs_to :flora +end diff --git a/app/models/content_groupers/planet_group.rb b/app/models/content_groupers/planet_group.rb new file mode 100644 index 00000000..79d474b3 --- /dev/null +++ b/app/models/content_groupers/planet_group.rb @@ -0,0 +1,5 @@ +class PlanetGroup < ActiveRecord::Base + belongs_to :user + belongs_to :planet + belongs_to :group +end diff --git a/app/models/content_groupers/planet_landmark.rb b/app/models/content_groupers/planet_landmark.rb new file mode 100644 index 00000000..df064ac0 --- /dev/null +++ b/app/models/content_groupers/planet_landmark.rb @@ -0,0 +1,5 @@ +class PlanetLandmark < ActiveRecord::Base + belongs_to :user + belongs_to :planet + belongs_to :landmark +end diff --git a/app/models/content_groupers/planet_language.rb b/app/models/content_groupers/planet_language.rb new file mode 100644 index 00000000..9eb3e76a --- /dev/null +++ b/app/models/content_groupers/planet_language.rb @@ -0,0 +1,5 @@ +class PlanetLanguage < ActiveRecord::Base + belongs_to :user + belongs_to :planet + belongs_to :language +end diff --git a/app/models/content_groupers/planet_location.rb b/app/models/content_groupers/planet_location.rb new file mode 100644 index 00000000..bbf176ec --- /dev/null +++ b/app/models/content_groupers/planet_location.rb @@ -0,0 +1,5 @@ +class PlanetLocation < ActiveRecord::Base + belongs_to :user + belongs_to :planet + belongs_to :location +end diff --git a/app/models/content_groupers/planet_nearby_planet.rb b/app/models/content_groupers/planet_nearby_planet.rb new file mode 100644 index 00000000..748fdc8a --- /dev/null +++ b/app/models/content_groupers/planet_nearby_planet.rb @@ -0,0 +1,24 @@ +class PlanetNearbyPlanet < ActiveRecord::Base + include HasContentLinking + LINK_TYPE = :two_way + + belongs_to :user + belongs_to :planet + belongs_to :nearby_planet, class_name: Planet.name + + after_create do + self.reciprocate( + relation: :planet_nearby_planets, + parent_object_ref: :planet, + added_object_ref: :nearby_planet + ) + end + + after_destroy do + # This is a two-way relation, so we should also delete the reverse association + this_object = Planet.find_by(id: self.planet_id) + other_object = Planet.find_by(id: self.nearby_planet_id) + + other_object.nearby_planets.delete(this_object) + end +end diff --git a/app/models/content_groupers/planet_race.rb b/app/models/content_groupers/planet_race.rb new file mode 100644 index 00000000..bb82115a --- /dev/null +++ b/app/models/content_groupers/planet_race.rb @@ -0,0 +1,5 @@ +class PlanetRace < ActiveRecord::Base + belongs_to :user + belongs_to :planet + belongs_to :race +end diff --git a/app/models/content_groupers/planet_religion.rb b/app/models/content_groupers/planet_religion.rb new file mode 100644 index 00000000..0b2f9cd1 --- /dev/null +++ b/app/models/content_groupers/planet_religion.rb @@ -0,0 +1,5 @@ +class PlanetReligion < ActiveRecord::Base + belongs_to :user + belongs_to :planet + belongs_to :religion +end diff --git a/app/models/content_groupers/planet_town.rb b/app/models/content_groupers/planet_town.rb new file mode 100644 index 00000000..dc875701 --- /dev/null +++ b/app/models/content_groupers/planet_town.rb @@ -0,0 +1,5 @@ +class PlanetTown < ActiveRecord::Base + belongs_to :user + belongs_to :planet + belongs_to :town +end diff --git a/app/models/content_groupers/sistergroupship.rb b/app/models/content_groupers/sistergroupship.rb index af4ca6b3..a5f1b22d 100644 --- a/app/models/content_groupers/sistergroupship.rb +++ b/app/models/content_groupers/sistergroupship.rb @@ -4,7 +4,7 @@ class Sistergroupship < ActiveRecord::Base belongs_to :user belongs_to :group - belongs_to :sistergroup, class_name: 'Group' + belongs_to :sistergroup, class_name: Group.name after_create do self.reciprocate relation: :sistergroupships, parent_object_ref: :group, added_object_ref: :sistergroup @@ -17,4 +17,4 @@ class Sistergroupship < ActiveRecord::Base other_object.sistergroups.delete this_object end -end \ No newline at end of file +end diff --git a/app/models/content_groupers/subgroupship.rb b/app/models/content_groupers/subgroupship.rb index 5cc66e71..bf47ed6a 100644 --- a/app/models/content_groupers/subgroupship.rb +++ b/app/models/content_groupers/subgroupship.rb @@ -10,7 +10,7 @@ class Subgroupship < ActiveRecord::Base this_object = Group.find_by(id: self.group_id) other_object = Group.find_by(id: self.subgroup_id) - other_object.supergroupships.create(group: other_object, supergroup: this_object) unless other_object.supergroups.include? this_object + other_object.supergroupships.create(group: other_object, supergroup: this_object) unless other_object.supergroups.include?(this_object) end after_destroy do @@ -18,6 +18,6 @@ class Subgroupship < ActiveRecord::Base this_object = Group.find_by(id: self.group_id) other_object = Group.find_by(id: self.subgroup_id) - other_object.supergroups.delete this_object + other_object.supergroups.delete(this_object) end -end \ No newline at end of file +end diff --git a/app/models/content_groupers/supergroupship.rb b/app/models/content_groupers/supergroupship.rb index db1d1a4d..71c3a5e3 100644 --- a/app/models/content_groupers/supergroupship.rb +++ b/app/models/content_groupers/supergroupship.rb @@ -4,7 +4,7 @@ class Supergroupship < ActiveRecord::Base belongs_to :user belongs_to :group - belongs_to :supergroup, class_name: 'Group' + belongs_to :supergroup, class_name: Group.name after_create do this_object = Group.find_by(id: self.group_id) @@ -20,4 +20,4 @@ class Supergroupship < ActiveRecord::Base other_object.subgroups.delete this_object end -end \ No newline at end of file +end diff --git a/app/models/content_groupers/technology_character.rb b/app/models/content_groupers/technology_character.rb new file mode 100644 index 00000000..6b6c36de --- /dev/null +++ b/app/models/content_groupers/technology_character.rb @@ -0,0 +1,5 @@ +class TechnologyCharacter < ActiveRecord::Base + belongs_to :user + belongs_to :technology + belongs_to :character +end diff --git a/app/models/content_groupers/technology_child_technology.rb b/app/models/content_groupers/technology_child_technology.rb new file mode 100644 index 00000000..58987f81 --- /dev/null +++ b/app/models/content_groupers/technology_child_technology.rb @@ -0,0 +1,25 @@ +class TechnologyChildTechnology < ActiveRecord::Base + include HasContentLinking + + belongs_to :user + belongs_to :technology + belongs_to :child_technology, class_name: Technology.name + + after_create do + this_object = Technology.find_by(id: self.technology_id) + other_object = Technology.find_by(id: self.child_technology_id) + + other_object.technology_parent_technologies.create( + technology: other_object, + parent_technology: this_object + ) unless other_object.parent_technologies.include?(this_object) + end + + after_destroy do + # This is a two-way relation, so we should also delete the reverse association + this_object = Technology.find_by(id: self.technology_id) + other_object = Technology.find_by(id: self.child_technology_id) + + other_object.parent_technologies.delete(this_object) + end +end diff --git a/app/models/content_groupers/technology_country.rb b/app/models/content_groupers/technology_country.rb new file mode 100644 index 00000000..0d269f39 --- /dev/null +++ b/app/models/content_groupers/technology_country.rb @@ -0,0 +1,5 @@ +class TechnologyCountry < ActiveRecord::Base + belongs_to :user + belongs_to :technology + belongs_to :country +end diff --git a/app/models/content_groupers/technology_creature.rb b/app/models/content_groupers/technology_creature.rb new file mode 100644 index 00000000..6956ff94 --- /dev/null +++ b/app/models/content_groupers/technology_creature.rb @@ -0,0 +1,5 @@ +class TechnologyCreature < ActiveRecord::Base + belongs_to :user + belongs_to :technology + belongs_to :creature +end diff --git a/app/models/content_groupers/technology_group.rb b/app/models/content_groupers/technology_group.rb new file mode 100644 index 00000000..e0e247ad --- /dev/null +++ b/app/models/content_groupers/technology_group.rb @@ -0,0 +1,5 @@ +class TechnologyGroup < ActiveRecord::Base + belongs_to :user + belongs_to :technology + belongs_to :group +end diff --git a/app/models/content_groupers/technology_magic.rb b/app/models/content_groupers/technology_magic.rb new file mode 100644 index 00000000..aa0de9c5 --- /dev/null +++ b/app/models/content_groupers/technology_magic.rb @@ -0,0 +1,5 @@ +class TechnologyMagic < ActiveRecord::Base + belongs_to :user + belongs_to :technology + belongs_to :magic +end diff --git a/app/models/content_groupers/technology_parent_technology.rb b/app/models/content_groupers/technology_parent_technology.rb new file mode 100644 index 00000000..39454c0a --- /dev/null +++ b/app/models/content_groupers/technology_parent_technology.rb @@ -0,0 +1,25 @@ +class TechnologyParentTechnology < ActiveRecord::Base + include HasContentLinking + + belongs_to :user + belongs_to :technology + belongs_to :parent_technology, class_name: Technology.name + + after_create do + this_object = Technology.find_by(id: self.technology_id) + other_object = Technology.find_by(id: self.parent_technology_id) + + other_object.technology_child_technologies.create( + technology: other_object, + child_technology: this_object + ) unless other_object.child_technologies.include?(this_object) + end + + after_destroy do + # This is a two-way relation, so we should also delete the reverse association + this_object = Technology.find_by(id: self.technology_id) + other_object = Technology.find_by(id: self.parent_technology_id) + + other_object.child_technologies.delete(this_object) + end +end diff --git a/app/models/content_groupers/technology_planet.rb b/app/models/content_groupers/technology_planet.rb new file mode 100644 index 00000000..4106617b --- /dev/null +++ b/app/models/content_groupers/technology_planet.rb @@ -0,0 +1,5 @@ +class TechnologyPlanet < ActiveRecord::Base + belongs_to :user + belongs_to :technology + belongs_to :planet +end diff --git a/app/models/content_groupers/technology_related_technology.rb b/app/models/content_groupers/technology_related_technology.rb new file mode 100644 index 00000000..80f61185 --- /dev/null +++ b/app/models/content_groupers/technology_related_technology.rb @@ -0,0 +1,19 @@ +class TechnologyRelatedTechnology < ActiveRecord::Base + include HasContentLinking + + belongs_to :user + belongs_to :technology + belongs_to :related_technology, class_name: Technology.name + + after_create do + self.reciprocate relation: :technology_related_technologies, parent_object_ref: :technology, added_object_ref: :related_technology + end + + after_destroy do + # This is a two-way relation, so we should also delete the reverse association + this_object = Technology.find_by(id: self.technology_id) + other_object = Technology.find_by(id: self.related_technology_id) + + other_object.related_technologies.delete(this_object) + end +end diff --git a/app/models/content_groupers/technology_town.rb b/app/models/content_groupers/technology_town.rb new file mode 100644 index 00000000..5a1b8742 --- /dev/null +++ b/app/models/content_groupers/technology_town.rb @@ -0,0 +1,5 @@ +class TechnologyTown < ActiveRecord::Base + belongs_to :user + belongs_to :technology + belongs_to :town +end diff --git a/app/models/content_types/character.rb b/app/models/content_types/character.rb index 675ebe14..263a75e0 100644 --- a/app/models/content_types/character.rb +++ b/app/models/content_types/character.rb @@ -27,7 +27,6 @@ class Character < ActiveRecord::Base include Authority::Abilities self.authorizer_name = 'CoreContentAuthorizer' - # Characters relates :fathers, with: :fatherships relates :mothers, with: :motherships relates :siblings, with: :siblingships @@ -36,18 +35,17 @@ class Character < ActiveRecord::Base relates :best_friends, with: :best_friendships relates :archenemies, with: :archenemyship relates :love_interests, with: :character_love_interests - - # Locations relates :birthplaces, with: :birthings - - # Items - #relates :favorite_items, with: :ownerships, where: { favorite: true } - - # Races relates :races, with: :raceships - - # Languages relates :spoken_languages, with: :lingualisms + relates :items, with: :character_items + relates :technologies, with: :character_technologies + relates :floras, with: :character_floras + relates :friends, with: :character_friends + relates :companions, with: :character_companions + relates :birthtowns, with: :character_birthtowns + relates :magics, with: :character_magics + relates :enemies, with: :character_enemies def description role diff --git a/app/models/content_types/country.rb b/app/models/content_types/country.rb index 46d499ec..af12cae3 100644 --- a/app/models/content_types/country.rb +++ b/app/models/content_types/country.rb @@ -25,7 +25,8 @@ class Country < ActiveRecord::Base relates :religions, with: :country_religions relates :landmarks, with: :country_landmarks relates :creatures, with: :country_creatures - relates :floras, with: :country_floras + relates :floras, with: :country_floras + relates :governments, with: :country_governments def self.content_name 'country' diff --git a/app/models/content_types/deity.rb b/app/models/content_types/deity.rb new file mode 100644 index 00000000..b10e7909 --- /dev/null +++ b/app/models/content_types/deity.rb @@ -0,0 +1,44 @@ +class Deity < ActiveRecord::Base + acts_as_paranoid + + belongs_to :user + validates :name, presence: true + validates :user_id, presence: true + + include BelongsToUniverse + include HasAttributes + include HasPrivacy + include HasContentGroupers + include HasImageUploads + include HasChangelog + include Serendipitous::Concern + + 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 + + def self.icon + 'ac_unit' + end + + def self.content_name + 'deity' + end +end diff --git a/app/models/content_types/government.rb b/app/models/content_types/government.rb new file mode 100644 index 00000000..0194e836 --- /dev/null +++ b/app/models/content_types/government.rb @@ -0,0 +1,37 @@ +class Government < ActiveRecord::Base + acts_as_paranoid + + belongs_to :user + validates :name, presence: true + validates :user_id, presence: true + + include BelongsToUniverse + include HasAttributes + include HasPrivacy + include HasContentGroupers + include HasImageUploads + include HasChangelog + include Serendipitous::Concern + + 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 + + def self.icon + 'account_balance' + end + + def self.content_name + 'government' + end +end diff --git a/app/models/content_types/group.rb b/app/models/content_types/group.rb index 955aa19f..1134daaa 100644 --- a/app/models/content_types/group.rb +++ b/app/models/content_types/group.rb @@ -19,11 +19,8 @@ class Group < ActiveRecord::Base include Authority::Abilities self.authorizer_name = 'ExtendedContentAuthorizer' - # Characters relates :leaders, with: :group_leaderships relates :members, with: :group_memberships - - # Groups relates :supergroups, with: :supergroupships relates :subgroups, with: :subgroupships relates :sistergroups, with: :sistergroupships @@ -32,15 +29,12 @@ class Group < ActiveRecord::Base relates :rivals, with: :group_rivalships relates :clients, with: :group_clientships relates :suppliers, with: :group_supplierships - - # Locations relates :locations, with: :group_locationships relates :headquarters, with: :headquarterships relates :offices, with: :officeships - - # Items relates :equipment, with: :group_equipmentships relates :key_items, with: :key_itemships + relates :creatures, with: :group_creatures def self.color 'cyan' diff --git a/app/models/content_types/item.rb b/app/models/content_types/item.rb index aa3240eb..3a31338c 100644 --- a/app/models/content_types/item.rb +++ b/app/models/content_types/item.rb @@ -30,6 +30,7 @@ class Item < ActiveRecord::Base relates :past_owners, with: :past_ownerships relates :current_owners, with: :current_ownerships relates :makers, with: :maker_relationships + relates :magics, with: :item_magics def self.color 'amber' diff --git a/app/models/content_types/location.rb b/app/models/content_types/location.rb index d20ee097..988e5150 100644 --- a/app/models/content_types/location.rb +++ b/app/models/content_types/location.rb @@ -29,16 +29,15 @@ class Location < ActiveRecord::Base include Authority::Abilities self.authorizer_name = 'CoreContentAuthorizer' - # Characters relates :leaders, with: :location_leaderships - - # Locations relates :capital_cities, with: :capital_cities_relationships relates :largest_cities, with: :largest_cities_relationships relates :notable_cities, with: :notable_cities_relationships - - # Languages relates :languages, with: :location_languageships + relates :capital_towns, with: :location_capital_towns + relates :largest_towns, with: :location_largest_towns + relates :notable_towns, with: :location_notable_towns + relates :landmarks, with: :location_landmarks def self.icon 'terrain' diff --git a/app/models/content_types/planet.rb b/app/models/content_types/planet.rb new file mode 100644 index 00000000..8a6b9346 --- /dev/null +++ b/app/models/content_types/planet.rb @@ -0,0 +1,43 @@ +class Planet < ActiveRecord::Base + acts_as_paranoid + + belongs_to :user + validates :name, presence: true + validates :user_id, presence: true + + include BelongsToUniverse + include HasAttributes + include HasPrivacy + include HasContentGroupers + include HasImageUploads + include HasChangelog + include Serendipitous::Concern + + 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 + + def self.icon + 'public' + end + + def self.content_name + 'planet' + end +end diff --git a/app/models/content_types/technology.rb b/app/models/content_types/technology.rb new file mode 100644 index 00000000..2f3b928d --- /dev/null +++ b/app/models/content_types/technology.rb @@ -0,0 +1,41 @@ +class Technology < ActiveRecord::Base + acts_as_paranoid + + belongs_to :user + validates :name, presence: true + validates :user_id, presence: true + + include BelongsToUniverse + include HasAttributes + include HasPrivacy + include HasContentGroupers + include HasImageUploads + include HasChangelog + include Serendipitous::Concern + + 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 + + def self.icon + 'router' + end + + def self.content_name + 'technology' + end +end diff --git a/app/models/content_types/universe.rb b/app/models/content_types/universe.rb index 861bccd4..5deb9a38 100644 --- a/app/models/content_types/universe.rb +++ b/app/models/content_types/universe.rb @@ -22,24 +22,28 @@ class Universe < ActiveRecord::Base validates :user_id, presence: true belongs_to :user - # Core content types + # The following doesn't work because we reference Universe when setting up this config + # Rails.application.config.content_types[:all_non_universe].each do |content_type| + # has_many content_types.name.downcase.pluralize.to_sym + # end has_many :characters - has_many :items - has_many :locations - - # Extended content types + has_many :countries has_many :creatures + has_many :deities + has_many :floras + has_many :governments + has_many :groups + has_many :items + has_many :landmarks + has_many :languages + has_many :locations + has_many :magics + has_many :planets has_many :races has_many :religions - has_many :magics - has_many :languages - has_many :floras - has_many :towns - has_many :countries - has_many :landmarks - has_many :scenes - has_many :groups + has_many :technologies + has_many :towns has_many :contributors, dependent: :destroy @@ -60,7 +64,7 @@ class Universe < ActiveRecord::Base end def self.icon - 'public' + 'language' end def self.content_name diff --git a/app/views/content/cards/_content_relation_list.html.erb b/app/views/content/cards/_content_relation_list.html.erb index 55f5a915..fd21b912 100644 --- a/app/views/content/cards/_content_relation_list.html.erb +++ b/app/views/content/cards/_content_relation_list.html.erb @@ -56,6 +56,7 @@ render partial: 'content/cards/content_relation_list', locals: { content_type: : <% relation.gsub!('', '') relation.strip! + relation = relation.singularize relation[0] = relation[0].upcase %> @@ -97,4 +98,4 @@ render partial: 'content/cards/content_relation_list', locals: { content_type: :
- \ No newline at end of file + diff --git a/app/views/content/contexts/_dynamic.html.erb b/app/views/content/contexts/_dynamic.html.erb new file mode 100644 index 00000000..7d1fa251 --- /dev/null +++ b/app/views/content/contexts/_dynamic.html.erb @@ -0,0 +1,49 @@ +<% + relations = Rails.application.config.content_relations[content.class.name] + + relations ||= [] + @references ||= {} +%> + +<% relations.each do |name, params| %> + <%= + render partial: 'content/contexts/relation', locals: { + content_type: content.class, + content: content, + relation_class: params[:related_class], + inverse_class: params[:inverse_class], + relation_class_id: "#{name.to_s.singularize}_id", + relation_text: params[:relation_text], + through_relation: params[:through_relation] + } + %> +<% end %> + +<% @references.each do |content_type, relations| %> + <% next unless relations.any? %> + <% + card_title = if relations.count == 1 + if relations.first.first.include? '' + relations.first.first + else + [ + relations.first.first, + ' of ', + pluralize(relations.count, "#{content_type.to_s.singularize}") + ].join + end + else + [ + 'Related to ', + pluralize(relations.count, "#{content_type.to_s.singularize}") + ].join + end + %> +
+ <%= render partial: 'content/cards/content_relation_list', locals: { + content_type: content_type, + relations: relations, + card_title: card_title + } %> +
+<% end %> diff --git a/app/views/content/contexts/_relation.html.erb b/app/views/content/contexts/_relation.html.erb index 17da081a..02f44599 100644 --- a/app/views/content/contexts/_relation.html.erb +++ b/app/views/content/contexts/_relation.html.erb @@ -3,15 +3,16 @@ content_type: Location, content: some_location_to_find_leaders_of, relation_class: LocationLeadership, - relation_class_id: :leader_id, - relation_text: :leader_of + relation_class_id: :leadership_id, + relation_text: :leader_of, + through_relation: 'Leader' } Note: Initializes/appends to @references[content_type] %> <% - string_content_type = content_type.to_s.downcase + string_content_type = inverse_class.downcase references_key = string_content_type.pluralize.to_sym pretty_relation_text = relation_text.to_s.titleize.downcase @@ -21,8 +22,8 @@ <%# .joins(:item).where('items.privacy' => ['public']) also works, but doesn't include current_user check %> <% - relations = relation_class.where("#{relation_class_id}": content.id) - .map { |content| content.send(string_content_type) } + relations = relation_class.where("#{through_relation.downcase}_id": content.id) + .map { |content| content.send(inverse_class.downcase) } .select { |content| content && content.readable_by?(current_user || User.new) } %> <% @@ -32,21 +33,19 @@ # pretty_relation_text[0] = pretty_relation_text[0].upcase @references[references_key] << [pretty_relation_text, relations.first] - elsif relations.count > 1 if pretty_relation_text.include? '' pretty_relation_text.gsub!('', pluralize(relations.count, string_content_type)) else - pretty_relation_text = "#{pretty_relation_text} #{pluralize(relations.count, string_content_type)}" + pretty_relation_text = "#{pretty_relation_text} of #{pluralize(relations.count, string_content_type)}" end pretty_relation_text[0] = pretty_relation_text[0].upcase - %>
<%= render partial: 'content/cards/in_universe_content_list', locals: { - content_type: content_type.to_s.downcase, + content_type: inverse_class.downcase, content_list: relations, - card_title: pretty_relation_text + card_title: pretty_relation_text } %>
<% end %> diff --git a/app/views/content/form/_groupship_fields.html.erb b/app/views/content/form/_groupship_fields.html.erb index 96c31064..c8fee709 100644 --- a/app/views/content/form/_groupship_fields.html.erb +++ b/app/views/content/form/_groupship_fields.html.erb @@ -26,6 +26,7 @@ f.select "#{attribute}_id", current_user.send("linkable_#{klass.pluralize}") .in_universe(@universe_scope) + .in_universe(@content.universe) .sort_by(&:name) .reject { |content| content.class.name == klass && content.id == @content.id } .map { |c| [c.name, c.id] } diff --git a/app/views/content/form/_relation_input.html.erb b/app/views/content/form/_relation_input.html.erb index d8b93df7..df05b26b 100644 --- a/app/views/content/form/_relation_input.html.erb +++ b/app/views/content/form/_relation_input.html.erb @@ -14,8 +14,9 @@ <%= render 'content/form/groupship_fields', f: builder, attribute: attribute.singularize, parent: f.object %> <% end %> <% else %> - <%= form_tag customization_toggle_content_type_path, method: :POST, remote: true do %>
+ +
+
+

Forum preferences

+
+ To change your forum preferences, including email notifications about posts you are following, please + <%= link_to thredded.edit_global_preferences_path do %> + click here. + <% end %> +
+
+
diff --git a/app/views/export/csv.html.erb b/app/views/export/csv.html.erb deleted file mode 100644 index b82f2902..00000000 --- a/app/views/export/csv.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -

Export#csv

-

Find me in app/views/export/csv.html.erb

diff --git a/app/views/export/html.html.erb b/app/views/export/html.html.erb deleted file mode 100644 index 5f9f00d5..00000000 --- a/app/views/export/html.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -

Export#html

-

Find me in app/views/export/html.html.erb

diff --git a/app/views/export/index.html.erb b/app/views/export/index.html.erb index 33235f1f..c5ba96ec 100644 --- a/app/views/export/index.html.erb +++ b/app/views/export/index.html.erb @@ -27,23 +27,12 @@
    -
  • <%= link_to "universes.csv", universes_csv_path %>
  • -
  • <%= link_to "characters.csv", characters_csv_path %>
  • -
  • <%= link_to "locations.csv", locations_csv_path %>
  • -
  • <%= link_to "items.csv", items_csv_path %>
  • - -
  • <%= link_to "creatures.csv", creatures_csv_path %>
  • -
  • <%= link_to "races.csv", races_csv_path %>
  • -
  • <%= link_to "religions.csv", religions_csv_path %>
  • -
  • <%= link_to "magics.csv", magics_csv_path %>
  • -
  • <%= link_to "languages.csv", languages_csv_path %>
  • -
  • <%= link_to "groups.csv", groups_csv_path %>
  • -
  • <%= link_to "floras.csv", floras_csv_path %>
  • -
  • <%= link_to "towns.csv", towns_csv_path %>
  • -
  • <%= link_to "countries.csv", countries_csv_path %>
  • -
  • <%= link_to "landmarks.csv", landmarks_csv_path %>
  • - -
  • <%= link_to "scenes.csv", scenes_csv_path %>
  • + <% Rails.application.config.content_types[:all].each do |page_type| %> +
  • + <%= link_to "#{page_type.name.downcase.pluralize}.csv", + notebook_csv_path(model: page_type.name.downcase.pluralize) %> +
  • + <% end %>
diff --git a/app/views/layouts/_sidenav.html.erb b/app/views/layouts/_sidenav.html.erb index 521d5f38..d586c486 100644 --- a/app/views/layouts/_sidenav.html.erb +++ b/app/views/layouts/_sidenav.html.erb @@ -70,24 +70,29 @@
  • Your Notebook Pages
  • - <% current_user.user_content_type_activators.reverse.each do |content_type_activator| %> - <% content_type = content_type_activator.content_type.constantize %> + <% + ( + Rails.application.config.content_types[:all].map(&:name) & + current_user.user_content_type_activators.pluck(:content_type) + ).each do |content_type| + %> + <% content_type_klass = content_type.constantize %>
  • - <%= link_to main_app.polymorphic_path(content_type) do %> - - <%= content_type.icon %> + <%= link_to main_app.polymorphic_path(content_type_klass) do %> + + <%= content_type_klass.icon %> - <%= content_type.name.pluralize %> + <%= content_type.pluralize %> <%= - pluralized_name = content_type_activator.content_type.downcase.pluralize - if content_type != Universe && @universe_scope + pluralized_name = content_type.downcase.pluralize + if content_type_klass != Universe && @universe_scope @universe_scope.send(pluralized_name).count else ( current_user.send(pluralized_name) + current_user.send("contributable_#{pluralized_name}") + - (content_type == Universe ? [] : content_type.where(universe_id: current_user.universes.pluck(:id))) + (content_type_klass == Universe ? [] : content_type_klass.where(universe_id: current_user.universes.pluck(:id))) ).uniq.count end %> diff --git a/app/views/main/dashboard.html.erb b/app/views/main/dashboard.html.erb index 40ea39d6..b860c4e0 100644 --- a/app/views/main/dashboard.html.erb +++ b/app/views/main/dashboard.html.erb @@ -13,7 +13,7 @@ %>
    - <% @content_types.reverse.each do |content_type| %> + <% @content_types.each do |content_type| %> <% pluralized_content_name = content_type.downcase.pluralize diff --git a/app/views/main/index.html.erb b/app/views/main/index.html.erb index 0c6a8200..cb161fa6 100644 --- a/app/views/main/index.html.erb +++ b/app/views/main/index.html.erb @@ -223,7 +223,13 @@
    <% - content_type_pool = [Universe, Scene, Group, Creature, Magic, Language, Race, Religion, Flora] + content_type_pool = [ + Universe, Scene, Group, + Creature, Magic, Language, + Race, Religion, Deity, + Technology, Government, Flora, + Country, Town, Landmark + ] %> <% content_type_pool.each do |content_type| %> @@ -271,11 +277,18 @@
      -
    • <%= t('marketing.landing_page.pricing.starter_plan.universes_html') %>
    • -
    • <%= t('marketing.landing_page.pricing.starter_plan.upload_html') %>
    • -
    • <%= t('marketing.landing_page.pricing.starter_plan.characters_html') %>
    • -
    • <%= t('marketing.landing_page.pricing.starter_plan.locations_html') %>
    • -
    • <%= t('marketing.landing_page.pricing.starter_plan.items_html') %>
    • + <% Rails.application.config.content_types[:free].each do |content_type| %> +
    • + + <%= content_type.icon %> + + <%= t("marketing.landing_page.pricing.starter_plan.#{content_type.name.downcase.pluralize}_html") %> +
    • + <% end %> +
    • + cloud_upload + <%= t('marketing.landing_page.pricing.starter_plan.upload_html') %> +
    <%= link_to t('marketing.landing_page.pricing.cta.button'), @@ -300,20 +313,18 @@
      -
    • <%= t('marketing.landing_page.pricing.premium_plan.universes_html') %>
    • -
    • <%= t('marketing.landing_page.pricing.premium_plan.upload_html') %>
    • -
    • <%= t('marketing.landing_page.pricing.premium_plan.characters_html') %>
    • -
    • <%= t('marketing.landing_page.pricing.premium_plan.locations_html') %>
    • -
    • <%= t('marketing.landing_page.pricing.premium_plan.items_html') %>
    • - -
    • <%= t('marketing.landing_page.pricing.premium_plan.creatures_html') %>
    • -
    • <%= t('marketing.landing_page.pricing.premium_plan.groups_html') %>
    • -
    • <%= t('marketing.landing_page.pricing.premium_plan.languages_html') %>
    • -
    • <%= t('marketing.landing_page.pricing.premium_plan.magics_html') %>
    • -
    • <%= t('marketing.landing_page.pricing.premium_plan.races_html') %>
    • -
    • <%= t('marketing.landing_page.pricing.premium_plan.religions_html') %>
    • -
    • <%= t('marketing.landing_page.pricing.premium_plan.floras_html') %>
    • -
    • <%= t('marketing.landing_page.pricing.premium_plan.scenes_html') %>
    • + <% Rails.application.config.content_types[:all].each do |content_type| %> +
    • + + <%= content_type.icon %> + + <%= t("marketing.landing_page.pricing.premium_plan.#{content_type.name.downcase.pluralize}_html") %> +
    • + <% end %> +
    • + cloud_upload + <%= t('marketing.landing_page.pricing.premium_plan.upload_html') %> +
    <%= link_to t('marketing.landing_page.pricing.cta.button'), diff --git a/app/views/thredded/users/_badge.html.erb b/app/views/thredded/users/_badge.html.erb index 65b63774..def56eff 100644 --- a/app/views/thredded/users/_badge.html.erb +++ b/app/views/thredded/users/_badge.html.erb @@ -1,7 +1,6 @@ <% badge_style = 'padding: 3px 5px; font-size: 70%; font-weight: normal;' %> <% if !user.respond_to?(:selected_billing_plan_id) %> - <% elsif user.selected_billing_plan_id == 2 %> Beta Tester <% elsif user.selected_billing_plan_id == 3 %> diff --git a/app/views/universes/_picker.html.erb b/app/views/universes/_picker.html.erb index 87042b1d..953880b7 100644 --- a/app/views/universes/_picker.html.erb +++ b/app/views/universes/_picker.html.erb @@ -7,7 +7,7 @@ end %> - vpn_lock + <%= Universe.icon %> <% if @universe_scope.present? %>
    <%= @universe_scope.name.truncate(10) %> diff --git a/config/attributes/character.yml b/config/attributes/character.yml index 478b1508..d007e5b4 100644 --- a/config/attributes/character.yml +++ b/config/attributes/character.yml @@ -57,17 +57,23 @@ - :name: hobbies :label: Hobbies - :name: personality_type - :label: Personality Type + :label: Personality type + - :name: magics + :label: Magical abilities :social: :label: Social :icon: groups :attributes: - - :name: spoken_languages - :label: Languages spoken - :name: best_friends - :label: Best Friends + :label: Best friends + - :name: friends + :label: Friends + - :name: companions + :label: Companions + - :name: enemies + :label: Enemies - :name: archenemies - :label: Arch Enemies + :label: Arch-enemies - :name: religion :label: Religion - :name: politics @@ -75,15 +81,17 @@ - :name: occupation :label: Occupation - :name: fave_color - :label: Favorite Color + :label: Favorite color - :name: fave_food - :label: Favorite Food + :label: Favorite food - :name: fave_possession - :label: Favorite Possession + :label: Favorite possession - :name: fave_weapon - :label: Favorite Weapon + :label: Favorite weapon - :name: fave_animal - :label: Favorite Animal + :label: Favorite animal + - :name: spoken_languages + :label: Languages spoken :history: :label: history :icon: info @@ -91,7 +99,9 @@ - :name: birthday :label: Birthday - :name: birthplaces - :label: Birthplaces + :label: Birthplace + - :name: birthtowns + :label: Birthplace - :name: education :label: Education - :name: background @@ -114,6 +124,16 @@ :label: Children - :name: pets :label: Pets +:inventory: + :label: Inventory + :icon: shopping_basket + :attributes: + - :name: items + :label: Items + - :name: technologies + :label: Technologies + - :name: floras + :label: Floras :gallery: :label: Gallery :icon: photo_library diff --git a/config/attributes/country.yml b/config/attributes/country.yml index d31231a4..9102abc6 100644 --- a/config/attributes/country.yml +++ b/config/attributes/country.yml @@ -36,6 +36,8 @@ :label: Languages - :name: religions :label: Religions + - :name: governments + :label: Governments :geography: :label: Geography :icon: terrain diff --git a/config/attributes/creature.yml b/config/attributes/creature.yml index 9a4cdf52..ccf7ba94 100644 --- a/config/attributes/creature.yml +++ b/config/attributes/creature.yml @@ -70,6 +70,22 @@ :label: Symbolisms - :name: related_creatures :label: Related creatures +:classification: + :label: Classification + :icon: bubble_chart + :attributes: + - :name: phylum + :label: Phylum + - :name: class_string + :label: Class + - :name: order + :label: Order + - :name: family + :label: Family + - :name: genus + :label: Genus + - :name: species + :label: Species :gallery: :label: Gallery :icon: photo_library diff --git a/config/attributes/deity.yml b/config/attributes/deity.yml new file mode 100644 index 00000000..200ad516 --- /dev/null +++ b/config/attributes/deity.yml @@ -0,0 +1,104 @@ + +:overview: + :label: Overview + :icon: info + :attributes: + - :name: name + :label: Name + - :name: description + :label: Description + - :name: other_names + :label: Other Names + - :name: universe_id + :label: Universe +:appearance: + :label: Appearance + :icon: accessibility + :attributes: + - :name: physical_description + :label: Physical Description + - :name: height + :label: Height + - :name: weight + :label: Weight +:family: + :label: Family + :icon: supervisor_account + :attributes: + - :name: character_parents + :label: Parents + - :name: character_partners + :label: Partners + - :name: character_children + :label: Children + - :name: deity_parents + :label: Parents + - :name: deity_partners + :label: Partners + - :name: deity_children + :label: Children +:symbolism: + :label: Symbolism + :icon: thumbs_up_down + :attributes: + - :name: symbols + :label: Symbols + - :name: elements + :label: Elements + - :name: creatures + :label: Creatures + - :name: floras + :label: Floras + - :name: religions + :label: Religions + - :name: relics + :label: Relics +:powers: + :label: Powers + :icon: grade + :attributes: + - :name: strengths + :label: Strengths + - :name: weaknesses + :label: Weaknesses + - :name: abilities + :label: Abilities +:rituals: + :label: Rituals + :icon: import_contacts + :attributes: + - :name: prayers + :label: Prayers + - :name: rituals + :label: Rituals + - :name: human_interaction + :label: Human Interaction + - :name: related_towns + :label: Related towns + - :name: related_landmarks + :label: Related landmarks +:history: + :label: History + :icon: timeline + :attributes: + - :name: notable_events + :label: Notable Events + - :name: family_history + :label: Family History + - :name: life_story + :label: Life Story +:gallery: + :label: Gallery + :icon: photo_library +:changelog: + :label: Changelog + :icon: history +:notes: + :label: Notes + :icon: edit + :attributes: + - :name: notes + :label: Notes + - :name: private_notes + :label: Private Notes + :description: Private notes are always visible to only you, even if content is made public and shared. diff --git a/config/attributes/flora.yml b/config/attributes/flora.yml index 916ea8e2..f3164a15 100644 --- a/config/attributes/flora.yml +++ b/config/attributes/flora.yml @@ -48,6 +48,8 @@ :label: Berries - :name: medicinal_purposes :label: Medicinal purposes + - :name: material_uses + :label: Material uses - :name: magics :label: Magical effects :ecosystem: diff --git a/config/attributes/government.yml b/config/attributes/government.yml new file mode 100644 index 00000000..70b341f0 --- /dev/null +++ b/config/attributes/government.yml @@ -0,0 +1,112 @@ + +:overview: + :label: Overview + :icon: info + :attributes: + - :name: name + :label: Name + - :name: description + :label: Description + - :name: universe_id + :label: Universe +:structure: + :label: Structure + :icon: view_list + :attributes: + - :name: type_of_government + :label: Type Of Government + - :name: power_structure + :label: Power Structure + - :name: power_source + :label: Power Source + - :name: checks_and_balances + :label: Checks And Balances +:ideologies: + :label: Ideologies + :icon: cloud + :attributes: + - :name: sociopolitical + :label: Sociopolitical + - :name: socioeconomical + :label: Socioeconomical + - :name: geocultural + :label: Geocultural + - :name: laws + :label: Laws + - :name: immigration + :label: Immigration + - :name: privacy_ideologies + :label: Privacy Ideologies +:process: + :label: Process + :icon: gavel + :attributes: + - :name: electoral_process + :label: Electoral Process + - :name: term_lengths + :label: Term Lengths + - :name: criminal_system + :label: Criminal System +:populace: + :label: Populace + :icon: visibility + :attributes: + - :name: approval_ratings + :label: Approval Ratings + - :name: international_relations + :label: International Relations + - :name: civilian_life + :label: Civilian Life +:members: + :label: Members + :icon: group + :attributes: + - :name: leaders + :label: Leaders + - :name: groups + :label: Groups + - :name: political_figures + :label: Political figures + - :name: military + :label: Military + - :name: navy + :label: Navy + - :name: airforce + :label: Airforce + - :name: space_program + :label: Space Program +:history: + :label: History + :icon: timeline + :attributes: + - :name: founding_story + :label: Founding Story + - :name: flag_design_story + :label: Flag Design Story + - :name: notable_wars + :label: Notable Wars +:assets: + :label: Assets + :icon: shopping_cart + :attributes: + - :name: items + :label: Items + - :name: technologies + :label: Technologies + - :name: creatures + :label: Creatures +:gallery: + :label: Gallery + :icon: photo_library +:changelog: + :label: Changelog + :icon: history +:notes: + :label: Notes + :icon: edit + :attributes: + - :name: notes + :label: Notes + - :name: private_notes + :label: Private Notes + :description: Private notes are always visible to only you, even if content is made public and shared. diff --git a/config/attributes/group.yml b/config/attributes/group.yml index 4603156b..679fd397 100644 --- a/config/attributes/group.yml +++ b/config/attributes/group.yml @@ -14,18 +14,24 @@ :label: Hierarchy :icon: call_split :attributes: - - :name: organization_structure - :label: Organization structure - - :name: leaders - :label: Leaders - - :name: members - :label: Members - :name: supergroups :label: Supergroups - :name: subgroups :label: Subgroups - :name: sistergroups :label: Sistergroups + - :name: organization_structure + :label: Organization structure +:members: + :label: Members + :icon: list + :attributes: + - :name: leaders + :label: Leaders + - :name: members + :label: Members + - :name: creatures + :label: Creatures :locations: :label: Locations :icon: location_on diff --git a/config/attributes/item.yml b/config/attributes/item.yml index 1f1dca07..543283f0 100644 --- a/config/attributes/item.yml +++ b/config/attributes/item.yml @@ -37,6 +37,8 @@ :icon: flash_on :attributes: - :name: magic + :label: Magical effects + - :name: magics :label: Magic :gallery: :label: Gallery diff --git a/config/attributes/location.yml b/config/attributes/location.yml index 85052a05..1b2c1aca 100644 --- a/config/attributes/location.yml +++ b/config/attributes/location.yml @@ -35,11 +35,17 @@ :icon: business :attributes: - :name: capital_cities - :label: Capital Cities + :label: Capital cities - :name: largest_cities - :label: Largest Cities + :label: Largest cities - :name: notable_cities - :label: Notable Cities + :label: Notable cities + - :name: capital_towns + :label: Capital cities + - :name: largest_towns + :label: Largest cities + - :name: notable_towns + :label: Notable cities :geography: :label: Geography :icon: map @@ -49,9 +55,11 @@ - :name: crops :label: Crops - :name: located_at - :label: Located At + :label: Located at - :name: climate :label: Climate + - :name: landmarks + :label: Landmarks :history: :label: History :icon: book diff --git a/config/attributes/planet.yml b/config/attributes/planet.yml new file mode 100644 index 00000000..acb7afd2 --- /dev/null +++ b/config/attributes/planet.yml @@ -0,0 +1,100 @@ + +:overview: + :label: Overview + :icon: info + :attributes: + - :name: name + :label: Name + - :name: description + :label: Description + - :name: universe_id + :label: Universe +:geography: + :label: Geography + :icon: layers + :attributes: + - :name: size + :label: Size + - :name: surface + :label: Surface + - :name: climate + :label: Climate + - :name: weather + :label: Weather + - :name: water_content + :label: Water Content + - :name: natural_resources + :label: Natural Resources + - :name: landmarks + :label: Landmarks + - :name: locations + :label: Locations + - :name: countries + :label: Countries +:time: + :label: Time + :icon: hourglass_empty + :attributes: + - :name: length_of_day + :label: Length Of Day + - :name: length_of_night + :label: Length Of Night + - :name: calendar_system + :label: Calendar System +:inhabitants: + :label: Inhabitants + :icon: face + :attributes: + - :name: population + :label: Population + - :name: races + :label: Races + - :name: floras + :label: Flora + - :name: creatures + :label: Creatures + - :name: religions + :label: Religions + - :name: deities + :label: Deities + - :name: groups + :label: Groups + - :name: languages + :label: Languages + - :name: towns + :label: Towns +:astral: + :label: Astral + :icon: star_border + :attributes: + - :name: moons + :label: Moons + - :name: orbit + :label: Orbit + - :name: visible_constellations + :label: Visible Constellations + - :name: nearby_planets + :label: Nearby planets +:history: + :label: History + :icon: timeline + :attributes: + - :name: first_inhabitants_story + :label: First Inhabitants Story + - :name: world_history + :label: World History +:gallery: + :label: Gallery + :icon: photo_library +:changelog: + :label: Changelog + :icon: history +:notes: + :label: Notes + :icon: edit + :attributes: + - :name: notes + :label: Notes + - :name: private_notes + :label: Private Notes + :description: Private notes are always visible to only you, even if content is made public and shared. diff --git a/config/attributes/technology.yml b/config/attributes/technology.yml new file mode 100644 index 00000000..5014cc38 --- /dev/null +++ b/config/attributes/technology.yml @@ -0,0 +1,91 @@ +:overview: + :label: Overview + :icon: info + :attributes: + - :name: name + :label: Name + - :name: description + :label: Description + - :name: other_names + :label: Other Names + - :name: universe_id + :label: Universe +:production: + :label: Production + :icon: build + :attributes: + - :name: materials + :label: Materials + - :name: manufacturing_process + :label: Manufacturing Process + - :name: sales_process + :label: Sales Process + - :name: cost + :label: Cost +:presence: + :label: Presence + :icon: blur_on + :attributes: + - :name: characters + :label: Characters + - :name: towns + :label: Towns + - :name: countries + :label: Countries + - :name: groups + :label: Groups + - :name: creatures + :label: Creatures + - :name: planets + :label: Planets + - :name: rarity + :label: Rarity +:use: + :label: Use + :icon: speaker_phone + :attributes: + - :name: purpose + :label: Purpose + - :name: how_it_works + :label: How It Works + - :name: resources_used + :label: Resources Used + - :name: magics + :label: Magic effects +:appearance: + :label: Appearance + :icon: sd_card + :attributes: + - :name: physical_description + :label: Physical Description + - :name: size + :label: Size + - :name: weight + :label: Weight + - :name: colors + :label: Colors +:related_technologies: + :label: Related technologies + :icon: call_split + :attributes: + - :name: related_technologies + :label: Related technologies + - :name: parent_technologies + :label: Parent technologies + - :name: child_technologies + :label: Child technologies +:gallery: + :label: Gallery + :icon: photo_library +:changelog: + :label: Changelog + :icon: history +:notes: + :label: Notes + :icon: edit + :attributes: + - :name: notes + :label: Notes + - :name: private_notes + :label: Private Notes + :description: Private notes are always visible to only you, even if content is made public and shared. diff --git a/config/attributes/universe.yml b/config/attributes/universe.yml index 4b16cdef..2320dbc1 100644 --- a/config/attributes/universe.yml +++ b/config/attributes/universe.yml @@ -22,8 +22,8 @@ :label: Laws of Physics - :name: magic_system :label: Magic System - - :name: technologies - :label: Technologies + - :name: technology + :label: Technology :notes: :label: Notes :icon: edit @@ -46,4 +46,4 @@ :label: Privacy :contributors: :label: Contributors - :icon: group_add \ No newline at end of file + :icon: group_add diff --git a/config/initializers/content_relations.rb b/config/initializers/content_relations.rb new file mode 100644 index 00000000..0d43cffe --- /dev/null +++ b/config/initializers/content_relations.rb @@ -0,0 +1 @@ +Rails.application.config.content_relations = {} diff --git a/config/initializers/content_types.rb b/config/initializers/content_types.rb index 7517f26e..1d64bb78 100644 --- a/config/initializers/content_types.rb +++ b/config/initializers/content_types.rb @@ -1,8 +1,9 @@ Rails.application.config.content_types = { # The complete list of all content types all: [ - Universe, Character, Location, Item, Creature, Flora, Group, Language, - Magic, Race, Religion, Scene, Town, Country, Landmark + Universe, Character, Location, Item, Country, Creature, Deity, Flora, + Government, Group, Landmark, Language, Magic, Planet, Race, Religion, Scene, + Technology, Town ], # These content types are always on for all users, and cannot be toggled off @@ -13,8 +14,8 @@ Rails.application.config.content_types = { # These content types are available to be turned on available: [ - Creature, Flora, Group, Language, Magic, Race, Religion, Scene, - Town, Country, Landmark + Country, Creature, Deity, Flora, Government, Group, Landmark, Language, + Magic, Planet, Race, Religion, Scene, Technology, Town ], # These content types can be created by any user @@ -22,8 +23,8 @@ Rails.application.config.content_types = { # These content types require a premium subscription to create premium: [ - Creature, Flora, Group, Language, Magic, Race, Religion, Scene, Town, - Country, Landmark + Country, Creature, Deity, Flora, Government, Group, Landmark, Language, + Magic, Planet, Race, Religion, Scene, Technology, Town ] } diff --git a/config/locales/en.yml b/config/locales/en.yml index 754b65c2..7d055fa3 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -117,14 +117,21 @@ en: locations_html: Plan unlimited locations items_html: Plan unlimited items + countries_html: Plan unlimited countries creatures_html: Plan unlimited creatures + deities_html: Plan unlimited deities + floras_html: Plan unlimited flora + governments_html: Plan unlimited governments groups_html: Plan unlimited groups + landmarks_html: Plan unlimited landmarks languages_html: Plan unlimited languages magics_html: Plan unlimited magic + planets_html: Plan unlimited planets races_html: Plan unlimited races religions_html: Plan unlimited religions - floras_html: Plan unlimited flora scenes_html: Plan unlimited scenes + technologies_html: Plan unlimited technologies + towns_html: Plan unlimited towns footer: title: Notebook.ai is an open-source project by Indent Labs. @@ -144,18 +151,21 @@ en: location: Location item: Item + country: Country creature: Creature + deity: Deity + flora: Flora + government: Government + group: Group + landmark: Landmark + language: Language + magic: Magic + planet: Planet race: Race religion: Religion - group: Group - magic: Magic - language: Language - flora: Flora - town: Town - country: Country - landmark: Landmark - scene: Scene + technology: Technology + town: Town user: User session: Session @@ -450,6 +460,107 @@ en: established_year: When was %{name} founded? notable_wars: What notable wars has %{name} participated in? + technology: + name: What's the name of this technology? + description: How would you describe %{name}? + other_names: What other names is %{name} known by? + + materials: What materials is %{name} made with? + manufacturing_process: How is %{name} produced and manufactured? + sales_process: How is %{name} sold? + cost: How much does %{name} cost? + + rarity: How rare (or common) is %{name}? + + purpose: What is %{name} used for? + how_it_works: How does %{name} work? + resources_used: What resources does %{name} use? + + physical_description: What does %{name} look like? + size: How big is the average %{name}? + weight: How much does the average %{name} weigh? + colors: What colors are the average %{name}? + + planet: + name: What's the name of %{name}? + description: How would you describe %{name}? + + size: How big is %{name}? + surface: What is the surface of %{name} like? + climate: What's the climate on %{name} like? + weather: What's the weather like on %{name}? + water_content: What's the water content like on %{name}? + natural_resources: What natural resources are there on %{name}? + + length_of_day: How long is daytime on %{name}? + length_of_night: How long is night time on %{name}? + calendar_system: What's the calendar system like on %{name}? + + population: What's the population like on %{name}? + + moons: Does %{name} have moons? If so, what are they? + orbit: What does %{name}'s astral orbit look like? + visible_constellations: What constellations are visible from %{name}? + + first_inhabitants_story: How did the first inhabitants arrive on this planet? + world_history: What is the world history of %{name}? + + government: + name: What's the name of %{name}? + description: How would you describe %{name}? + + type_of_government: What type of government is %{name}? + power_structure: How is %{name}'s power structured? How is it organized? Who has what powers? + power_source: Where does %{name}'s source of power come from? + checks_and_balances: What checks and balances does %{name} have in place? + + sociopolitical: What sociopolitical ideologies does %{name} hold? + socioeconomical: What socioeconomical ideologies does %{name} hold? + geocultural: What geocultural ideologies does %{name} hold? + laws: What are the laws of %{name}? + immigration: What immigration policies and ideologies does %{name} hold? + privacy_ideologies: What does %{name} think about privacy? + + electoral_process: What is the electoral process of %{name}? + term_lengths: What are the term lengths for people in %{name}? + criminal_system: What is %{name}'s criminal system like? + + approval_ratings: What do the people think of %{name}? What are their approval ratings? + international_relations: What do international governments think about %{name}? How are their relations? + civilian_life: What is civilian life like for the people ruled by %{name}? + + military: What does %{name}'s military look like? + navy: What does %{name}'s navy look like? + airforce: What does %{name}'s airforce look like? + space_program: Does %{name} have a space program? What is it like? + + founding_story: How was %{name} created? What is its founding story? + flag_design_story: How was %{name}'s flag designed? + notable_wars: What notable wars throughout history has %{name} been involved in? + + deity: + name: What is %{name}'s name? + description: How would you describe %{name}? + other_names: What other names is %{name} known by? + + physical_description: How would you describe what %{name} looks like physically? + height: How tall is %{name}? + weight: How much does %{name} weigh? + + symbols: What symbols are commonly associated with %{name}? + elements: What elements are commonly associated with %{name}? + + strengths: What are %{name}'s strengths? + weaknesses: What are %{name}'s weaknesses? + + prayers: What prayers are commonly associated with %{name}? How do followers pray? + rituals: What rituals are commonly associated with %{name}? How do they work? + human_interaction: How often does %{name} interact with their followers? In what ways? + + notable_events: What notable events throughout history has %{name} been a part of? + family_history: What is %{name}'s family history? + life_story: What is %{name}'s life story? + blacklist: _: - id @@ -466,17 +577,21 @@ en: character: The souls of your world location: A world of possibilities item: Every item has a story + country: Kingdoms, countries, and regions creature: Your personal bestiary + deity: Gods, goddesses, and celestial beings + flora: The plants and nature of your world + government: The governments of your world + group: From fellowships to organizations + landmark: Statues, caves, peaks, and more + language: Design your own languages + magic: Spells, potions, and other magical things + planet: Planets, separated by space race: The melting pot of cultures religion: What do your characters believe in? - group: From fellowships to organizations - magic: Spells, potions, and other magical things - language: Design your own languages - flora: The plants and nature of your world scene: Create scenes to organize a plot + technology: Gadgets, gizmos, and advanced technology town: Civilization's establishments - country: Kingdoms, countries, and regions - landmark: Statues, caves, peaks, and more content_descriptions: universe: > @@ -514,6 +629,14 @@ en: From the smallest statue to the biggest mountain, landmarks are littered across the land. scene: > Scenes are events that happen in your world, ranging in size from a nice breakfast to entire wars. + planet: > + Celestial bodies orbiting through space, carrying a planet's-worth of worldbuilding on them. + deity: > + Gods, goddesses, and other godly beings in your world — every world came from somewhere. + government: > + The organizations of your world that keep it running smoothly (or not): governments. + technology: > + Create your gadgets, gizmos, and all kinds of advanced (or primitive) technologies. attributefield: > Attributes can be anything you need to define just the detail you need. Select the type of content you're describing and setup any number of attributes to do the job. diff --git a/config/routes.rb b/config/routes.rb index ce110c39..f20b1786 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -21,6 +21,11 @@ Rails.application.routes.draw do get :scenes, on: :member get :groups, on: :member get :universes, on: :member + get :planets, on: :member + get :technologies, on: :member + get :deities, on: :member + get :governments, on: :member + # end delete 'contributor/:id/remove', to: 'contributors#destroy', as: :remove_contributor @@ -111,6 +116,11 @@ Rails.application.routes.draw do get :countries, on: :member get :towns, on: :member get :landmarks, on: :member + get :planets, on: :member + get :technologies, on: :member + get :deities, on: :member + get :governments, on: :member + # end resources :characters do get :autocomplete_character_name, on: :collection, as: :autocomplete_name @@ -130,10 +140,13 @@ Rails.application.routes.draw do resources :towns resources :countries resources :landmarks - - # Content usage resources :scenes resources :groups + resources :planets + resources :technologies + resources :deities + resources :governments + # # Content attributes resources :attributes @@ -161,22 +174,7 @@ Rails.application.routes.draw do get '/outline', to: 'export#outline', as: :notebook_outline get '/notebook.json', to: 'export#notebook_json', as: :notebook_json get '/notebook.xml', to: 'export#notebook_xml', as: :notebook_xml - - get '/universes.csv', to: 'export#universes_csv', as: :universes_csv - get '/characters.csv', to: 'export#characters_csv', as: :characters_csv - get '/locations.csv', to: 'export#locations_csv', as: :locations_csv - get '/items.csv', to: 'export#items_csv', as: :items_csv - get '/creatures.csv', to: 'export#creatures_csv', as: :creatures_csv - get '/races.csv', to: 'export#races_csv', as: :races_csv - get '/floras.csv', to: 'export#floras_csv', as: :floras_csv - get '/religions.csv', to: 'export#religions_csv', as: :religions_csv - get '/magics.csv', to: 'export#magics_csv', as: :magics_csv - get '/languages.csv', to: 'export#languages_csv', as: :languages_csv - get '/scenes.csv', to: 'export#scenes_csv', as: :scenes_csv - get '/groups.csv', to: 'export#groups_csv', as: :groups_csv - get '/towns.csv', to: 'export#towns_csv', as: :towns_csv - get '/countries.csv', to: 'export#countries_csv', as: :countries_csv - get '/landmarks.csv', to: 'export#landmarks_csv', as: :landmarks_csv + get '/:model.csv', to: 'export#csv', as: :notebook_csv end scope '/scene/:scene_id' do diff --git a/db/migrate/20180127055730_create_planets.rb b/db/migrate/20180127055730_create_planets.rb new file mode 100644 index 00000000..7c5e069f --- /dev/null +++ b/db/migrate/20180127055730_create_planets.rb @@ -0,0 +1,32 @@ +class CreatePlanets < ActiveRecord::Migration + def change + create_table :planets do |t| + t.string :name + t.string :description + t.string :size + t.string :surface + t.string :landmarks + t.string :climate + t.string :weather + t.string :water_content + t.string :natural_resources + t.string :length_of_day + t.string :length_of_night + t.string :calendar_system + t.string :population + t.string :moons + t.string :orbit + t.string :visible_constellations + t.string :first_inhabitants_story + t.string :world_history + t.string :public_notes + t.string :private_notes + t.string :privacy + t.references :universe, index: true, foreign_key: true + t.references :user, index: true, foreign_key: true + t.datetime :deleted_at + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180127200709_create_technologies.rb b/db/migrate/20180127200709_create_technologies.rb new file mode 100644 index 00000000..b1594cf8 --- /dev/null +++ b/db/migrate/20180127200709_create_technologies.rb @@ -0,0 +1,29 @@ +class CreateTechnologies < ActiveRecord::Migration + def change + create_table :technologies do |t| + t.string :name + t.string :description + t.string :other_names + t.string :materials + t.string :manufacturing_process + t.string :sales_process + t.string :cost + t.string :rarity + t.string :purpose + t.string :how_it_works + t.string :resources_used + t.string :physical_description + t.string :size + t.string :weight + t.string :colors + t.string :notes + t.string :private_notes + t.string :privacy + t.references :user, index: true, foreign_key: true + t.references :universe, index: true, foreign_key: true + t.datetime :deleted_at + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180127200846_change_notes_column_on_planets.rb b/db/migrate/20180127200846_change_notes_column_on_planets.rb new file mode 100644 index 00000000..f7a79427 --- /dev/null +++ b/db/migrate/20180127200846_change_notes_column_on_planets.rb @@ -0,0 +1,6 @@ +class ChangeNotesColumnOnPlanets < ActiveRecord::Migration + def change + remove_column :planets, :public_notes + add_column :planets, :notes, :string + end +end diff --git a/db/migrate/20180127202120_create_deities.rb b/db/migrate/20180127202120_create_deities.rb new file mode 100644 index 00000000..24a4bfe4 --- /dev/null +++ b/db/migrate/20180127202120_create_deities.rb @@ -0,0 +1,30 @@ +class CreateDeities < ActiveRecord::Migration + def change + create_table :deities do |t| + t.string :name + t.string :description + t.string :other_names + t.string :physical_description + t.string :height + t.string :weight + t.string :symbols + t.string :elements + t.string :strengths + t.string :weaknesses + t.string :prayers + t.string :rituals + t.string :human_interaction + t.string :notable_events + t.string :family_history + t.string :life_story + t.string :notes + t.string :private_notes + t.string :privacy + t.references :user, index: true, foreign_key: true + t.references :universe, index: true, foreign_key: true + t.datetime :deleted_at + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180127203130_create_governments.rb b/db/migrate/20180127203130_create_governments.rb new file mode 100644 index 00000000..9075370f --- /dev/null +++ b/db/migrate/20180127203130_create_governments.rb @@ -0,0 +1,39 @@ +class CreateGovernments < ActiveRecord::Migration + def change + create_table :governments do |t| + t.string :name + t.string :description + t.string :type_of_government + t.string :power_structure + t.string :power_source + t.string :checks_and_balances + t.string :sociopolitical + t.string :socioeconomical + t.string :geocultural + t.string :laws + t.string :immigration + t.string :privacy_ideologies + t.string :electoral_process + t.string :term_lengths + t.string :criminal_system + t.string :approval_ratings + t.string :military + t.string :navy + t.string :airforce + t.string :space_program + t.string :international_relations + t.string :civilian_life + t.string :founding_story + t.string :flag_design_story + t.string :notable_wars + t.string :notes + t.string :private_notes + t.string :privacy + t.references :user, index: true, foreign_key: true + t.references :universe, index: true, foreign_key: true + t.datetime :deleted_at + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180129033131_rename_universe_technologies_to_technology.rb b/db/migrate/20180129033131_rename_universe_technologies_to_technology.rb new file mode 100644 index 00000000..07d77f33 --- /dev/null +++ b/db/migrate/20180129033131_rename_universe_technologies_to_technology.rb @@ -0,0 +1,5 @@ +class RenameUniverseTechnologiesToTechnology < ActiveRecord::Migration + def change + rename_column :universes, :technologies, :technology if column_exists?(:universes, :technologies) && !column_exists?(:universes, :technology) + end +end diff --git a/db/migrate/20180130231607_remove_landmarks_from_planets.rb b/db/migrate/20180130231607_remove_landmarks_from_planets.rb new file mode 100644 index 00000000..7025bff9 --- /dev/null +++ b/db/migrate/20180130231607_remove_landmarks_from_planets.rb @@ -0,0 +1,5 @@ +class RemoveLandmarksFromPlanets < ActiveRecord::Migration + def change + remove_column :planets, :landmarks + end +end diff --git a/db/migrate/20180130233224_create_planet_countries.rb b/db/migrate/20180130233224_create_planet_countries.rb new file mode 100644 index 00000000..6d057faf --- /dev/null +++ b/db/migrate/20180130233224_create_planet_countries.rb @@ -0,0 +1,11 @@ +class CreatePlanetCountries < ActiveRecord::Migration + def change + create_table :planet_countries do |t| + t.references :user, index: true, foreign_key: true + t.references :planet, index: true, foreign_key: true + t.references :country, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130233229_create_planet_locations.rb b/db/migrate/20180130233229_create_planet_locations.rb new file mode 100644 index 00000000..64dc31c6 --- /dev/null +++ b/db/migrate/20180130233229_create_planet_locations.rb @@ -0,0 +1,11 @@ +class CreatePlanetLocations < ActiveRecord::Migration + def change + create_table :planet_locations do |t| + t.references :user, index: true, foreign_key: true + t.references :planet, index: true, foreign_key: true + t.references :location, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130233235_create_planet_landmarks.rb b/db/migrate/20180130233235_create_planet_landmarks.rb new file mode 100644 index 00000000..6c4e90c2 --- /dev/null +++ b/db/migrate/20180130233235_create_planet_landmarks.rb @@ -0,0 +1,11 @@ +class CreatePlanetLandmarks < ActiveRecord::Migration + def change + create_table :planet_landmarks do |t| + t.references :user, index: true, foreign_key: true + t.references :planet, index: true, foreign_key: true + t.references :landmark, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130233240_create_planet_races.rb b/db/migrate/20180130233240_create_planet_races.rb new file mode 100644 index 00000000..37800c13 --- /dev/null +++ b/db/migrate/20180130233240_create_planet_races.rb @@ -0,0 +1,11 @@ +class CreatePlanetRaces < ActiveRecord::Migration + def change + create_table :planet_races do |t| + t.references :user, index: true, foreign_key: true + t.references :planet, index: true, foreign_key: true + t.references :race, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130233245_create_planet_floras.rb b/db/migrate/20180130233245_create_planet_floras.rb new file mode 100644 index 00000000..93831399 --- /dev/null +++ b/db/migrate/20180130233245_create_planet_floras.rb @@ -0,0 +1,11 @@ +class CreatePlanetFloras < ActiveRecord::Migration + def change + create_table :planet_floras do |t| + t.references :user, index: true, foreign_key: true + t.references :planet, index: true, foreign_key: true + t.references :flora, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130233250_create_planet_creatures.rb b/db/migrate/20180130233250_create_planet_creatures.rb new file mode 100644 index 00000000..591aadb3 --- /dev/null +++ b/db/migrate/20180130233250_create_planet_creatures.rb @@ -0,0 +1,11 @@ +class CreatePlanetCreatures < ActiveRecord::Migration + def change + create_table :planet_creatures do |t| + t.references :user, index: true, foreign_key: true + t.references :planet, index: true, foreign_key: true + t.references :creature, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130233256_create_planet_religions.rb b/db/migrate/20180130233256_create_planet_religions.rb new file mode 100644 index 00000000..44498535 --- /dev/null +++ b/db/migrate/20180130233256_create_planet_religions.rb @@ -0,0 +1,11 @@ +class CreatePlanetReligions < ActiveRecord::Migration + def change + create_table :planet_religions do |t| + t.references :user, index: true, foreign_key: true + t.references :planet, index: true, foreign_key: true + t.references :religion, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130233301_create_planet_deities.rb b/db/migrate/20180130233301_create_planet_deities.rb new file mode 100644 index 00000000..5eb0080f --- /dev/null +++ b/db/migrate/20180130233301_create_planet_deities.rb @@ -0,0 +1,11 @@ +class CreatePlanetDeities < ActiveRecord::Migration + def change + create_table :planet_deities do |t| + t.references :user, index: true, foreign_key: true + t.references :planet, index: true, foreign_key: true + t.references :deity, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130233306_create_planet_groups.rb b/db/migrate/20180130233306_create_planet_groups.rb new file mode 100644 index 00000000..64edf65b --- /dev/null +++ b/db/migrate/20180130233306_create_planet_groups.rb @@ -0,0 +1,11 @@ +class CreatePlanetGroups < ActiveRecord::Migration + def change + create_table :planet_groups do |t| + t.references :user, index: true, foreign_key: true + t.references :planet, index: true, foreign_key: true + t.references :group, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130233311_create_planet_languages.rb b/db/migrate/20180130233311_create_planet_languages.rb new file mode 100644 index 00000000..3b42e231 --- /dev/null +++ b/db/migrate/20180130233311_create_planet_languages.rb @@ -0,0 +1,11 @@ +class CreatePlanetLanguages < ActiveRecord::Migration + def change + create_table :planet_languages do |t| + t.references :user, index: true, foreign_key: true + t.references :planet, index: true, foreign_key: true + t.references :language, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130233316_create_planet_towns.rb b/db/migrate/20180130233316_create_planet_towns.rb new file mode 100644 index 00000000..0386ee6e --- /dev/null +++ b/db/migrate/20180130233316_create_planet_towns.rb @@ -0,0 +1,11 @@ +class CreatePlanetTowns < ActiveRecord::Migration + def change + create_table :planet_towns do |t| + t.references :user, index: true, foreign_key: true + t.references :planet, index: true, foreign_key: true + t.references :town, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130233539_create_planet_nearby_planets.rb b/db/migrate/20180130233539_create_planet_nearby_planets.rb new file mode 100644 index 00000000..b9fb8dba --- /dev/null +++ b/db/migrate/20180130233539_create_planet_nearby_planets.rb @@ -0,0 +1,11 @@ +class CreatePlanetNearbyPlanets < ActiveRecord::Migration + def change + create_table :planet_nearby_planets do |t| + t.references :user, index: true, foreign_key: true + t.references :planet, index: true, foreign_key: true + t.integer :nearby_planet_id + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130233841_create_technology_characters.rb b/db/migrate/20180130233841_create_technology_characters.rb new file mode 100644 index 00000000..e5c4b18a --- /dev/null +++ b/db/migrate/20180130233841_create_technology_characters.rb @@ -0,0 +1,11 @@ +class CreateTechnologyCharacters < ActiveRecord::Migration + def change + create_table :technology_characters do |t| + t.references :user, index: true, foreign_key: true + t.references :technology, index: true, foreign_key: true + t.references :character, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130233846_create_technology_towns.rb b/db/migrate/20180130233846_create_technology_towns.rb new file mode 100644 index 00000000..cc701fcc --- /dev/null +++ b/db/migrate/20180130233846_create_technology_towns.rb @@ -0,0 +1,11 @@ +class CreateTechnologyTowns < ActiveRecord::Migration + def change + create_table :technology_towns do |t| + t.references :user, index: true, foreign_key: true + t.references :technology, index: true, foreign_key: true + t.references :town, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130233851_create_technology_countries.rb b/db/migrate/20180130233851_create_technology_countries.rb new file mode 100644 index 00000000..525eb8fd --- /dev/null +++ b/db/migrate/20180130233851_create_technology_countries.rb @@ -0,0 +1,11 @@ +class CreateTechnologyCountries < ActiveRecord::Migration + def change + create_table :technology_countries do |t| + t.references :user, index: true, foreign_key: true + t.references :technology, index: true, foreign_key: true + t.references :country, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130233857_create_technology_groups.rb b/db/migrate/20180130233857_create_technology_groups.rb new file mode 100644 index 00000000..67a94159 --- /dev/null +++ b/db/migrate/20180130233857_create_technology_groups.rb @@ -0,0 +1,11 @@ +class CreateTechnologyGroups < ActiveRecord::Migration + def change + create_table :technology_groups do |t| + t.references :user, index: true, foreign_key: true + t.references :technology, index: true, foreign_key: true + t.references :group, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130233902_create_technology_creatures.rb b/db/migrate/20180130233902_create_technology_creatures.rb new file mode 100644 index 00000000..bd2a0754 --- /dev/null +++ b/db/migrate/20180130233902_create_technology_creatures.rb @@ -0,0 +1,11 @@ +class CreateTechnologyCreatures < ActiveRecord::Migration + def change + create_table :technology_creatures do |t| + t.references :user, index: true, foreign_key: true + t.references :technology, index: true, foreign_key: true + t.references :creature, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130233907_create_technology_planets.rb b/db/migrate/20180130233907_create_technology_planets.rb new file mode 100644 index 00000000..8f7d36dd --- /dev/null +++ b/db/migrate/20180130233907_create_technology_planets.rb @@ -0,0 +1,11 @@ +class CreateTechnologyPlanets < ActiveRecord::Migration + def change + create_table :technology_planets do |t| + t.references :user, index: true, foreign_key: true + t.references :technology, index: true, foreign_key: true + t.references :planet, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130233912_create_technology_magics.rb b/db/migrate/20180130233912_create_technology_magics.rb new file mode 100644 index 00000000..f21668b5 --- /dev/null +++ b/db/migrate/20180130233912_create_technology_magics.rb @@ -0,0 +1,11 @@ +class CreateTechnologyMagics < ActiveRecord::Migration + def change + create_table :technology_magics do |t| + t.references :user, index: true, foreign_key: true + t.references :technology, index: true, foreign_key: true + t.references :magic, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130233918_create_technology_parent_technologies.rb b/db/migrate/20180130233918_create_technology_parent_technologies.rb new file mode 100644 index 00000000..732ca462 --- /dev/null +++ b/db/migrate/20180130233918_create_technology_parent_technologies.rb @@ -0,0 +1,11 @@ +class CreateTechnologyParentTechnologies < ActiveRecord::Migration + def change + create_table :technology_parent_technologies do |t| + t.references :user, index: true, foreign_key: true + t.references :technology, index: true, foreign_key: true + t.integer :parent_technology_id + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130233923_create_technology_child_technologies.rb b/db/migrate/20180130233923_create_technology_child_technologies.rb new file mode 100644 index 00000000..f4f4c8f8 --- /dev/null +++ b/db/migrate/20180130233923_create_technology_child_technologies.rb @@ -0,0 +1,11 @@ +class CreateTechnologyChildTechnologies < ActiveRecord::Migration + def change + create_table :technology_child_technologies do |t| + t.references :user, index: true, foreign_key: true + t.references :technology, index: true, foreign_key: true + t.integer :child_technology_id + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130233928_create_technology_related_technologies.rb b/db/migrate/20180130233928_create_technology_related_technologies.rb new file mode 100644 index 00000000..02ea8668 --- /dev/null +++ b/db/migrate/20180130233928_create_technology_related_technologies.rb @@ -0,0 +1,11 @@ +class CreateTechnologyRelatedTechnologies < ActiveRecord::Migration + def change + create_table :technology_related_technologies do |t| + t.references :user, index: true, foreign_key: true + t.references :technology, index: true, foreign_key: true + t.integer :related_technology_id + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130234318_create_deity_character_parents.rb b/db/migrate/20180130234318_create_deity_character_parents.rb new file mode 100644 index 00000000..9fc72cb0 --- /dev/null +++ b/db/migrate/20180130234318_create_deity_character_parents.rb @@ -0,0 +1,11 @@ +class CreateDeityCharacterParents < ActiveRecord::Migration + def change + create_table :deity_character_parents do |t| + t.references :user, index: true, foreign_key: true + t.references :deity, index: true, foreign_key: true + t.integer :character_parent_id + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130234323_create_deity_character_partners.rb b/db/migrate/20180130234323_create_deity_character_partners.rb new file mode 100644 index 00000000..d89a20ad --- /dev/null +++ b/db/migrate/20180130234323_create_deity_character_partners.rb @@ -0,0 +1,11 @@ +class CreateDeityCharacterPartners < ActiveRecord::Migration + def change + create_table :deity_character_partners do |t| + t.references :user, index: true, foreign_key: true + t.references :deity, index: true, foreign_key: true + t.integer :character_partner_id + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130234329_create_deity_character_children.rb b/db/migrate/20180130234329_create_deity_character_children.rb new file mode 100644 index 00000000..7fbf0493 --- /dev/null +++ b/db/migrate/20180130234329_create_deity_character_children.rb @@ -0,0 +1,11 @@ +class CreateDeityCharacterChildren < ActiveRecord::Migration + def change + create_table :deity_character_children do |t| + t.references :user, index: true, foreign_key: true + t.references :deity, index: true, foreign_key: true + t.integer :character_child_id + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130234334_create_deity_deity_parents.rb b/db/migrate/20180130234334_create_deity_deity_parents.rb new file mode 100644 index 00000000..289530ee --- /dev/null +++ b/db/migrate/20180130234334_create_deity_deity_parents.rb @@ -0,0 +1,11 @@ +class CreateDeityDeityParents < ActiveRecord::Migration + def change + create_table :deity_deity_parents do |t| + t.references :user, index: true, foreign_key: true + t.references :deity, index: true, foreign_key: true + t.integer :deity_parent_id + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130234339_create_deity_deity_partners.rb b/db/migrate/20180130234339_create_deity_deity_partners.rb new file mode 100644 index 00000000..196fcba3 --- /dev/null +++ b/db/migrate/20180130234339_create_deity_deity_partners.rb @@ -0,0 +1,11 @@ +class CreateDeityDeityPartners < ActiveRecord::Migration + def change + create_table :deity_deity_partners do |t| + t.references :user, index: true, foreign_key: true + t.references :deity, index: true, foreign_key: true + t.integer :deity_partner_id + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130234344_create_deity_deity_children.rb b/db/migrate/20180130234344_create_deity_deity_children.rb new file mode 100644 index 00000000..ac1f1af1 --- /dev/null +++ b/db/migrate/20180130234344_create_deity_deity_children.rb @@ -0,0 +1,11 @@ +class CreateDeityDeityChildren < ActiveRecord::Migration + def change + create_table :deity_deity_children do |t| + t.references :user, index: true, foreign_key: true + t.references :deity, index: true, foreign_key: true + t.integer :deity_child_id + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130234349_create_deity_creatures.rb b/db/migrate/20180130234349_create_deity_creatures.rb new file mode 100644 index 00000000..469757f9 --- /dev/null +++ b/db/migrate/20180130234349_create_deity_creatures.rb @@ -0,0 +1,11 @@ +class CreateDeityCreatures < ActiveRecord::Migration + def change + create_table :deity_creatures do |t| + t.references :user, index: true, foreign_key: true + t.references :deity, index: true, foreign_key: true + t.references :creature, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130234355_create_deity_floras.rb b/db/migrate/20180130234355_create_deity_floras.rb new file mode 100644 index 00000000..b87d9407 --- /dev/null +++ b/db/migrate/20180130234355_create_deity_floras.rb @@ -0,0 +1,11 @@ +class CreateDeityFloras < ActiveRecord::Migration + def change + create_table :deity_floras do |t| + t.references :user, index: true, foreign_key: true + t.references :deity, index: true, foreign_key: true + t.references :flora, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130234400_create_deity_religions.rb b/db/migrate/20180130234400_create_deity_religions.rb new file mode 100644 index 00000000..e68889fd --- /dev/null +++ b/db/migrate/20180130234400_create_deity_religions.rb @@ -0,0 +1,11 @@ +class CreateDeityReligions < ActiveRecord::Migration + def change + create_table :deity_religions do |t| + t.references :user, index: true, foreign_key: true + t.references :deity, index: true, foreign_key: true + t.references :religion, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130234405_create_deity_relics.rb b/db/migrate/20180130234405_create_deity_relics.rb new file mode 100644 index 00000000..96d53df2 --- /dev/null +++ b/db/migrate/20180130234405_create_deity_relics.rb @@ -0,0 +1,11 @@ +class CreateDeityRelics < ActiveRecord::Migration + def change + create_table :deity_relics do |t| + t.references :user, index: true, foreign_key: true + t.references :deity, index: true, foreign_key: true + t.integer :relic_id + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130234410_create_deity_abilities.rb b/db/migrate/20180130234410_create_deity_abilities.rb new file mode 100644 index 00000000..c580b0a0 --- /dev/null +++ b/db/migrate/20180130234410_create_deity_abilities.rb @@ -0,0 +1,11 @@ +class CreateDeityAbilities < ActiveRecord::Migration + def change + create_table :deity_abilities do |t| + t.references :user, index: true, foreign_key: true + t.references :deity, index: true, foreign_key: true + t.integer :ability_id + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130234415_create_deity_related_towns.rb b/db/migrate/20180130234415_create_deity_related_towns.rb new file mode 100644 index 00000000..a28ea07b --- /dev/null +++ b/db/migrate/20180130234415_create_deity_related_towns.rb @@ -0,0 +1,11 @@ +class CreateDeityRelatedTowns < ActiveRecord::Migration + def change + create_table :deity_related_towns do |t| + t.references :user, index: true, foreign_key: true + t.references :deity, index: true, foreign_key: true + t.integer :related_town_id + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130234420_create_deity_related_landmarks.rb b/db/migrate/20180130234420_create_deity_related_landmarks.rb new file mode 100644 index 00000000..37a05875 --- /dev/null +++ b/db/migrate/20180130234420_create_deity_related_landmarks.rb @@ -0,0 +1,11 @@ +class CreateDeityRelatedLandmarks < ActiveRecord::Migration + def change + create_table :deity_related_landmarks do |t| + t.references :user, index: true, foreign_key: true + t.references :deity, index: true, foreign_key: true + t.integer :related_landmark_id + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130234505_create_government_leaders.rb b/db/migrate/20180130234505_create_government_leaders.rb new file mode 100644 index 00000000..64052334 --- /dev/null +++ b/db/migrate/20180130234505_create_government_leaders.rb @@ -0,0 +1,11 @@ +class CreateGovernmentLeaders < ActiveRecord::Migration + def change + create_table :government_leaders do |t| + t.references :user, index: true, foreign_key: true + t.references :government, index: true, foreign_key: true + t.integer :leader_id + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130234511_create_government_groups.rb b/db/migrate/20180130234511_create_government_groups.rb new file mode 100644 index 00000000..c620f36d --- /dev/null +++ b/db/migrate/20180130234511_create_government_groups.rb @@ -0,0 +1,11 @@ +class CreateGovernmentGroups < ActiveRecord::Migration + def change + create_table :government_groups do |t| + t.references :user, index: true, foreign_key: true + t.references :government, index: true, foreign_key: true + t.references :group, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130234516_create_government_political_figures.rb b/db/migrate/20180130234516_create_government_political_figures.rb new file mode 100644 index 00000000..b502720b --- /dev/null +++ b/db/migrate/20180130234516_create_government_political_figures.rb @@ -0,0 +1,11 @@ +class CreateGovernmentPoliticalFigures < ActiveRecord::Migration + def change + create_table :government_political_figures do |t| + t.references :user, index: true, foreign_key: true + t.references :government, index: true, foreign_key: true + t.integer :political_figure_id + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130234521_create_government_items.rb b/db/migrate/20180130234521_create_government_items.rb new file mode 100644 index 00000000..a8d341cf --- /dev/null +++ b/db/migrate/20180130234521_create_government_items.rb @@ -0,0 +1,11 @@ +class CreateGovernmentItems < ActiveRecord::Migration + def change + create_table :government_items do |t| + t.references :user, index: true, foreign_key: true + t.references :government, index: true, foreign_key: true + t.references :item, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130234526_create_government_technologies.rb b/db/migrate/20180130234526_create_government_technologies.rb new file mode 100644 index 00000000..c46886bf --- /dev/null +++ b/db/migrate/20180130234526_create_government_technologies.rb @@ -0,0 +1,11 @@ +class CreateGovernmentTechnologies < ActiveRecord::Migration + def change + create_table :government_technologies do |t| + t.references :user, index: true, foreign_key: true + t.references :government, index: true, foreign_key: true + t.references :technology, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180130234531_create_government_creatures.rb b/db/migrate/20180130234531_create_government_creatures.rb new file mode 100644 index 00000000..1b233d63 --- /dev/null +++ b/db/migrate/20180130234531_create_government_creatures.rb @@ -0,0 +1,11 @@ +class CreateGovernmentCreatures < ActiveRecord::Migration + def change + create_table :government_creatures do |t| + t.references :user, index: true, foreign_key: true + t.references :government, index: true, foreign_key: true + t.references :creature, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180131055724_create_character_items.rb b/db/migrate/20180131055724_create_character_items.rb new file mode 100644 index 00000000..986c0bd3 --- /dev/null +++ b/db/migrate/20180131055724_create_character_items.rb @@ -0,0 +1,11 @@ +class CreateCharacterItems < ActiveRecord::Migration + def change + create_table :character_items do |t| + t.references :user, index: true, foreign_key: true + t.references :character, index: true, foreign_key: true + t.references :item, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180131055729_create_character_technologies.rb b/db/migrate/20180131055729_create_character_technologies.rb new file mode 100644 index 00000000..f99a6d27 --- /dev/null +++ b/db/migrate/20180131055729_create_character_technologies.rb @@ -0,0 +1,11 @@ +class CreateCharacterTechnologies < ActiveRecord::Migration + def change + create_table :character_technologies do |t| + t.references :user, index: true, foreign_key: true + t.references :character, index: true, foreign_key: true + t.references :technology, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180131055734_create_character_floras.rb b/db/migrate/20180131055734_create_character_floras.rb new file mode 100644 index 00000000..e6f8afe2 --- /dev/null +++ b/db/migrate/20180131055734_create_character_floras.rb @@ -0,0 +1,11 @@ +class CreateCharacterFloras < ActiveRecord::Migration + def change + create_table :character_floras do |t| + t.references :user, index: true, foreign_key: true + t.references :character, index: true, foreign_key: true + t.references :flora, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180131055739_create_character_friends.rb b/db/migrate/20180131055739_create_character_friends.rb new file mode 100644 index 00000000..23b9bce5 --- /dev/null +++ b/db/migrate/20180131055739_create_character_friends.rb @@ -0,0 +1,11 @@ +class CreateCharacterFriends < ActiveRecord::Migration + def change + create_table :character_friends do |t| + t.references :user, index: true, foreign_key: true + t.references :character, index: true, foreign_key: true + t.integer :friend_id + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180131055744_create_character_companions.rb b/db/migrate/20180131055744_create_character_companions.rb new file mode 100644 index 00000000..3497550e --- /dev/null +++ b/db/migrate/20180131055744_create_character_companions.rb @@ -0,0 +1,11 @@ +class CreateCharacterCompanions < ActiveRecord::Migration + def change + create_table :character_companions do |t| + t.references :user, index: true, foreign_key: true + t.references :character, index: true, foreign_key: true + t.integer :companion_id + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180131060014_create_character_birthtowns.rb b/db/migrate/20180131060014_create_character_birthtowns.rb new file mode 100644 index 00000000..053dcb86 --- /dev/null +++ b/db/migrate/20180131060014_create_character_birthtowns.rb @@ -0,0 +1,11 @@ +class CreateCharacterBirthtowns < ActiveRecord::Migration + def change + create_table :character_birthtowns do |t| + t.references :user, index: true, foreign_key: true + t.references :character, index: true, foreign_key: true + t.integer :birthtown_id + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180131061140_create_location_capital_towns.rb b/db/migrate/20180131061140_create_location_capital_towns.rb new file mode 100644 index 00000000..5a4c044f --- /dev/null +++ b/db/migrate/20180131061140_create_location_capital_towns.rb @@ -0,0 +1,11 @@ +class CreateLocationCapitalTowns < ActiveRecord::Migration + def change + create_table :location_capital_towns do |t| + t.references :location, index: true, foreign_key: true + t.integer :capital_town_id + t.references :user, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180131061146_create_location_largest_towns.rb b/db/migrate/20180131061146_create_location_largest_towns.rb new file mode 100644 index 00000000..6c9701c5 --- /dev/null +++ b/db/migrate/20180131061146_create_location_largest_towns.rb @@ -0,0 +1,11 @@ +class CreateLocationLargestTowns < ActiveRecord::Migration + def change + create_table :location_largest_towns do |t| + t.references :location, index: true, foreign_key: true + t.integer :largest_town_id + t.references :user, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180131061151_create_location_notable_towns.rb b/db/migrate/20180131061151_create_location_notable_towns.rb new file mode 100644 index 00000000..aa361f38 --- /dev/null +++ b/db/migrate/20180131061151_create_location_notable_towns.rb @@ -0,0 +1,11 @@ +class CreateLocationNotableTowns < ActiveRecord::Migration + def change + create_table :location_notable_towns do |t| + t.references :location, index: true, foreign_key: true + t.integer :notable_town_id + t.references :user, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180131061726_create_location_landmarks.rb b/db/migrate/20180131061726_create_location_landmarks.rb new file mode 100644 index 00000000..5c2a5a2b --- /dev/null +++ b/db/migrate/20180131061726_create_location_landmarks.rb @@ -0,0 +1,11 @@ +class CreateLocationLandmarks < ActiveRecord::Migration + def change + create_table :location_landmarks do |t| + t.references :location, index: true, foreign_key: true + t.references :landmark, index: true, foreign_key: true + t.references :user, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180131061902_create_item_magics.rb b/db/migrate/20180131061902_create_item_magics.rb new file mode 100644 index 00000000..eb2e1adb --- /dev/null +++ b/db/migrate/20180131061902_create_item_magics.rb @@ -0,0 +1,11 @@ +class CreateItemMagics < ActiveRecord::Migration + def change + create_table :item_magics do |t| + t.references :item, index: true, foreign_key: true + t.references :magic, index: true, foreign_key: true + t.references :user, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180131062407_create_country_governments.rb b/db/migrate/20180131062407_create_country_governments.rb new file mode 100644 index 00000000..fad0016c --- /dev/null +++ b/db/migrate/20180131062407_create_country_governments.rb @@ -0,0 +1,11 @@ +class CreateCountryGovernments < ActiveRecord::Migration + def change + create_table :country_governments do |t| + t.references :country, index: true, foreign_key: true + t.references :government, index: true, foreign_key: true + t.references :user, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180131062923_create_group_creatures.rb b/db/migrate/20180131062923_create_group_creatures.rb new file mode 100644 index 00000000..f6d5fe29 --- /dev/null +++ b/db/migrate/20180131062923_create_group_creatures.rb @@ -0,0 +1,11 @@ +class CreateGroupCreatures < ActiveRecord::Migration + def change + create_table :group_creatures do |t| + t.references :group, index: true, foreign_key: true + t.references :creature, index: true, foreign_key: true + t.references :user, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180131063312_create_character_magics.rb b/db/migrate/20180131063312_create_character_magics.rb new file mode 100644 index 00000000..e5749933 --- /dev/null +++ b/db/migrate/20180131063312_create_character_magics.rb @@ -0,0 +1,11 @@ +class CreateCharacterMagics < ActiveRecord::Migration + def change + create_table :character_magics do |t| + t.references :character, index: true, foreign_key: true + t.references :magic, index: true, foreign_key: true + t.references :user, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180131063532_create_character_enemies.rb b/db/migrate/20180131063532_create_character_enemies.rb new file mode 100644 index 00000000..9ede9964 --- /dev/null +++ b/db/migrate/20180131063532_create_character_enemies.rb @@ -0,0 +1,11 @@ +class CreateCharacterEnemies < ActiveRecord::Migration + def change + create_table :character_enemies do |t| + t.references :character, index: true, foreign_key: true + t.integer :enemy_id + t.references :user, index: true, foreign_key: true + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20180131064051_add_classification_fields_to_creatures.rb b/db/migrate/20180131064051_add_classification_fields_to_creatures.rb new file mode 100644 index 00000000..0954fe18 --- /dev/null +++ b/db/migrate/20180131064051_add_classification_fields_to_creatures.rb @@ -0,0 +1,10 @@ +class AddClassificationFieldsToCreatures < ActiveRecord::Migration + def change + add_column :creatures, :phylum, :string + add_column :creatures, :class_string, :string + add_column :creatures, :order, :string + add_column :creatures, :family, :string + add_column :creatures, :genus, :string + add_column :creatures, :species, :string + end +end diff --git a/db/migrate/20180131064902_add_material_uses_to_flora.rb b/db/migrate/20180131064902_add_material_uses_to_flora.rb new file mode 100644 index 00000000..e134b3e1 --- /dev/null +++ b/db/migrate/20180131064902_add_material_uses_to_flora.rb @@ -0,0 +1,5 @@ +class AddMaterialUsesToFlora < ActiveRecord::Migration + def change + add_column :floras, :material_uses, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index aa4c6703..8fc46dc7 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20180120033402) do +ActiveRecord::Schema.define(version: 20180131064902) do create_table "archenemyships", force: :cascade do |t| t.integer "user_id" @@ -105,6 +105,74 @@ ActiveRecord::Schema.define(version: 20180120033402) do t.integer "capital_city_id" end + create_table "character_birthtowns", force: :cascade do |t| + t.integer "user_id" + t.integer "character_id" + t.integer "birthtown_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "character_birthtowns", ["character_id"], name: "index_character_birthtowns_on_character_id" + add_index "character_birthtowns", ["user_id"], name: "index_character_birthtowns_on_user_id" + + create_table "character_companions", force: :cascade do |t| + t.integer "user_id" + t.integer "character_id" + t.integer "companion_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "character_companions", ["character_id"], name: "index_character_companions_on_character_id" + add_index "character_companions", ["user_id"], name: "index_character_companions_on_user_id" + + create_table "character_enemies", force: :cascade do |t| + t.integer "character_id" + t.integer "enemy_id" + t.integer "user_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "character_enemies", ["character_id"], name: "index_character_enemies_on_character_id" + add_index "character_enemies", ["user_id"], name: "index_character_enemies_on_user_id" + + create_table "character_floras", force: :cascade do |t| + t.integer "user_id" + t.integer "character_id" + t.integer "flora_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "character_floras", ["character_id"], name: "index_character_floras_on_character_id" + add_index "character_floras", ["flora_id"], name: "index_character_floras_on_flora_id" + add_index "character_floras", ["user_id"], name: "index_character_floras_on_user_id" + + create_table "character_friends", force: :cascade do |t| + t.integer "user_id" + t.integer "character_id" + t.integer "friend_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "character_friends", ["character_id"], name: "index_character_friends_on_character_id" + add_index "character_friends", ["user_id"], name: "index_character_friends_on_user_id" + + create_table "character_items", force: :cascade do |t| + t.integer "user_id" + t.integer "character_id" + t.integer "item_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "character_items", ["character_id"], name: "index_character_items_on_character_id" + add_index "character_items", ["item_id"], name: "index_character_items_on_item_id" + add_index "character_items", ["user_id"], name: "index_character_items_on_user_id" + create_table "character_love_interests", force: :cascade do |t| t.integer "user_id" t.integer "character_id" @@ -116,6 +184,30 @@ ActiveRecord::Schema.define(version: 20180120033402) do add_index "character_love_interests", ["character_id"], name: "index_character_love_interests_on_character_id" add_index "character_love_interests", ["user_id"], name: "index_character_love_interests_on_user_id" + create_table "character_magics", force: :cascade do |t| + t.integer "character_id" + t.integer "magic_id" + t.integer "user_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "character_magics", ["character_id"], name: "index_character_magics_on_character_id" + add_index "character_magics", ["magic_id"], name: "index_character_magics_on_magic_id" + add_index "character_magics", ["user_id"], name: "index_character_magics_on_user_id" + + create_table "character_technologies", force: :cascade do |t| + t.integer "user_id" + t.integer "character_id" + t.integer "technology_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "character_technologies", ["character_id"], name: "index_character_technologies_on_character_id" + add_index "character_technologies", ["technology_id"], name: "index_character_technologies_on_technology_id" + add_index "character_technologies", ["user_id"], name: "index_character_technologies_on_user_id" + create_table "characters", force: :cascade do |t| t.string "name", null: false t.string "role" @@ -248,6 +340,18 @@ ActiveRecord::Schema.define(version: 20180120033402) do add_index "country_floras", ["flora_id"], name: "index_country_floras_on_flora_id" add_index "country_floras", ["user_id"], name: "index_country_floras_on_user_id" + create_table "country_governments", force: :cascade do |t| + t.integer "country_id" + t.integer "government_id" + t.integer "user_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "country_governments", ["country_id"], name: "index_country_governments_on_country_id" + add_index "country_governments", ["government_id"], name: "index_country_governments_on_government_id" + add_index "country_governments", ["user_id"], name: "index_country_governments_on_user_id" + create_table "country_landmarks", force: :cascade do |t| t.integer "user_id" t.integer "country_id" @@ -349,6 +453,12 @@ ActiveRecord::Schema.define(version: 20180120033402) do t.string "private_notes" t.string "privacy" t.datetime "deleted_at" + t.string "phylum" + t.string "class_string" + t.string "order" + t.string "family" + t.string "genus" + t.string "species" end add_index "creatures", ["deleted_at"], name: "index_creatures_on_deleted_at" @@ -361,6 +471,182 @@ ActiveRecord::Schema.define(version: 20180120033402) do t.integer "current_owner_id" end + create_table "deities", force: :cascade do |t| + t.string "name" + t.string "description" + t.string "other_names" + t.string "physical_description" + t.string "height" + t.string "weight" + t.string "symbols" + t.string "elements" + t.string "strengths" + t.string "weaknesses" + t.string "prayers" + t.string "rituals" + t.string "human_interaction" + t.string "notable_events" + t.string "family_history" + t.string "life_story" + t.string "notes" + t.string "private_notes" + t.string "privacy" + t.integer "user_id" + t.integer "universe_id" + t.datetime "deleted_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "deities", ["universe_id"], name: "index_deities_on_universe_id" + add_index "deities", ["user_id"], name: "index_deities_on_user_id" + + create_table "deity_abilities", force: :cascade do |t| + t.integer "user_id" + t.integer "deity_id" + t.integer "ability_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "deity_abilities", ["deity_id"], name: "index_deity_abilities_on_deity_id" + add_index "deity_abilities", ["user_id"], name: "index_deity_abilities_on_user_id" + + create_table "deity_character_children", force: :cascade do |t| + t.integer "user_id" + t.integer "deity_id" + t.integer "character_child_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "deity_character_children", ["deity_id"], name: "index_deity_character_children_on_deity_id" + add_index "deity_character_children", ["user_id"], name: "index_deity_character_children_on_user_id" + + create_table "deity_character_parents", force: :cascade do |t| + t.integer "user_id" + t.integer "deity_id" + t.integer "character_parent_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "deity_character_parents", ["deity_id"], name: "index_deity_character_parents_on_deity_id" + add_index "deity_character_parents", ["user_id"], name: "index_deity_character_parents_on_user_id" + + create_table "deity_character_partners", force: :cascade do |t| + t.integer "user_id" + t.integer "deity_id" + t.integer "character_partner_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "deity_character_partners", ["deity_id"], name: "index_deity_character_partners_on_deity_id" + add_index "deity_character_partners", ["user_id"], name: "index_deity_character_partners_on_user_id" + + create_table "deity_creatures", force: :cascade do |t| + t.integer "user_id" + t.integer "deity_id" + t.integer "creature_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "deity_creatures", ["creature_id"], name: "index_deity_creatures_on_creature_id" + add_index "deity_creatures", ["deity_id"], name: "index_deity_creatures_on_deity_id" + add_index "deity_creatures", ["user_id"], name: "index_deity_creatures_on_user_id" + + create_table "deity_deity_children", force: :cascade do |t| + t.integer "user_id" + t.integer "deity_id" + t.integer "deity_child_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "deity_deity_children", ["deity_id"], name: "index_deity_deity_children_on_deity_id" + add_index "deity_deity_children", ["user_id"], name: "index_deity_deity_children_on_user_id" + + create_table "deity_deity_parents", force: :cascade do |t| + t.integer "user_id" + t.integer "deity_id" + t.integer "deity_parent_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "deity_deity_parents", ["deity_id"], name: "index_deity_deity_parents_on_deity_id" + add_index "deity_deity_parents", ["user_id"], name: "index_deity_deity_parents_on_user_id" + + create_table "deity_deity_partners", force: :cascade do |t| + t.integer "user_id" + t.integer "deity_id" + t.integer "deity_partner_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "deity_deity_partners", ["deity_id"], name: "index_deity_deity_partners_on_deity_id" + add_index "deity_deity_partners", ["user_id"], name: "index_deity_deity_partners_on_user_id" + + create_table "deity_floras", force: :cascade do |t| + t.integer "user_id" + t.integer "deity_id" + t.integer "flora_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "deity_floras", ["deity_id"], name: "index_deity_floras_on_deity_id" + add_index "deity_floras", ["flora_id"], name: "index_deity_floras_on_flora_id" + add_index "deity_floras", ["user_id"], name: "index_deity_floras_on_user_id" + + create_table "deity_related_landmarks", force: :cascade do |t| + t.integer "user_id" + t.integer "deity_id" + t.integer "related_landmark_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "deity_related_landmarks", ["deity_id"], name: "index_deity_related_landmarks_on_deity_id" + add_index "deity_related_landmarks", ["user_id"], name: "index_deity_related_landmarks_on_user_id" + + create_table "deity_related_towns", force: :cascade do |t| + t.integer "user_id" + t.integer "deity_id" + t.integer "related_town_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "deity_related_towns", ["deity_id"], name: "index_deity_related_towns_on_deity_id" + add_index "deity_related_towns", ["user_id"], name: "index_deity_related_towns_on_user_id" + + create_table "deity_relics", force: :cascade do |t| + t.integer "user_id" + t.integer "deity_id" + t.integer "relic_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "deity_relics", ["deity_id"], name: "index_deity_relics_on_deity_id" + add_index "deity_relics", ["user_id"], name: "index_deity_relics_on_user_id" + + create_table "deity_religions", force: :cascade do |t| + t.integer "user_id" + t.integer "deity_id" + t.integer "religion_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "deity_religions", ["deity_id"], name: "index_deity_religions_on_deity_id" + add_index "deity_religions", ["religion_id"], name: "index_deity_religions_on_religion_id" + add_index "deity_religions", ["user_id"], name: "index_deity_religions_on_user_id" + create_table "deityships", force: :cascade do |t| t.integer "religion_id" t.integer "deity_id" @@ -460,6 +746,7 @@ ActiveRecord::Schema.define(version: 20180120033402) do t.string "private_notes" t.string "privacy" t.datetime "deleted_at" + t.string "material_uses" end add_index "floras", ["deleted_at"], name: "index_floras_on_deleted_at" @@ -479,6 +766,115 @@ ActiveRecord::Schema.define(version: 20180120033402) do add_index "friendly_id_slugs", ["sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_id" add_index "friendly_id_slugs", ["sluggable_type"], name: "index_friendly_id_slugs_on_sluggable_type" + create_table "government_creatures", force: :cascade do |t| + t.integer "user_id" + t.integer "government_id" + t.integer "creature_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "government_creatures", ["creature_id"], name: "index_government_creatures_on_creature_id" + add_index "government_creatures", ["government_id"], name: "index_government_creatures_on_government_id" + add_index "government_creatures", ["user_id"], name: "index_government_creatures_on_user_id" + + create_table "government_groups", force: :cascade do |t| + t.integer "user_id" + t.integer "government_id" + t.integer "group_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "government_groups", ["government_id"], name: "index_government_groups_on_government_id" + add_index "government_groups", ["group_id"], name: "index_government_groups_on_group_id" + add_index "government_groups", ["user_id"], name: "index_government_groups_on_user_id" + + create_table "government_items", force: :cascade do |t| + t.integer "user_id" + t.integer "government_id" + t.integer "item_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "government_items", ["government_id"], name: "index_government_items_on_government_id" + add_index "government_items", ["item_id"], name: "index_government_items_on_item_id" + add_index "government_items", ["user_id"], name: "index_government_items_on_user_id" + + create_table "government_leaders", force: :cascade do |t| + t.integer "user_id" + t.integer "government_id" + t.integer "leader_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "government_leaders", ["government_id"], name: "index_government_leaders_on_government_id" + add_index "government_leaders", ["user_id"], name: "index_government_leaders_on_user_id" + + create_table "government_political_figures", force: :cascade do |t| + t.integer "user_id" + t.integer "government_id" + t.integer "political_figure_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "government_political_figures", ["government_id"], name: "index_government_political_figures_on_government_id" + add_index "government_political_figures", ["user_id"], name: "index_government_political_figures_on_user_id" + + create_table "government_technologies", force: :cascade do |t| + t.integer "user_id" + t.integer "government_id" + t.integer "technology_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "government_technologies", ["government_id"], name: "index_government_technologies_on_government_id" + add_index "government_technologies", ["technology_id"], name: "index_government_technologies_on_technology_id" + add_index "government_technologies", ["user_id"], name: "index_government_technologies_on_user_id" + + create_table "governments", force: :cascade do |t| + t.string "name" + t.string "description" + t.string "type_of_government" + t.string "power_structure" + t.string "power_source" + t.string "checks_and_balances" + t.string "sociopolitical" + t.string "socioeconomical" + t.string "geocultural" + t.string "laws" + t.string "immigration" + t.string "privacy_ideologies" + t.string "electoral_process" + t.string "term_lengths" + t.string "criminal_system" + t.string "approval_ratings" + t.string "military" + t.string "navy" + t.string "airforce" + t.string "space_program" + t.string "international_relations" + t.string "civilian_life" + t.string "founding_story" + t.string "flag_design_story" + t.string "notable_wars" + t.string "notes" + t.string "private_notes" + t.string "privacy" + t.integer "user_id" + t.integer "universe_id" + t.datetime "deleted_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "governments", ["universe_id"], name: "index_governments_on_universe_id" + add_index "governments", ["user_id"], name: "index_governments_on_user_id" + create_table "group_allyships", force: :cascade do |t| t.integer "user_id" t.integer "group_id" @@ -491,6 +887,18 @@ ActiveRecord::Schema.define(version: 20180120033402) do t.integer "client_id" end + create_table "group_creatures", force: :cascade do |t| + t.integer "group_id" + t.integer "creature_id" + t.integer "user_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "group_creatures", ["creature_id"], name: "index_group_creatures_on_creature_id" + add_index "group_creatures", ["group_id"], name: "index_group_creatures_on_group_id" + add_index "group_creatures", ["user_id"], name: "index_group_creatures_on_user_id" + create_table "group_enemyships", force: :cascade do |t| t.integer "user_id" t.integer "group_id" @@ -579,6 +987,18 @@ ActiveRecord::Schema.define(version: 20180120033402) do add_index "image_uploads", ["content_type", "content_id"], name: "index_image_uploads_on_content_type_and_content_id" add_index "image_uploads", ["user_id"], name: "index_image_uploads_on_user_id" + create_table "item_magics", force: :cascade do |t| + t.integer "item_id" + t.integer "magic_id" + t.integer "user_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "item_magics", ["item_id"], name: "index_item_magics_on_item_id" + add_index "item_magics", ["magic_id"], name: "index_item_magics_on_magic_id" + add_index "item_magics", ["user_id"], name: "index_item_magics_on_user_id" + create_table "items", force: :cascade do |t| t.string "name", null: false t.string "item_type" @@ -716,6 +1136,29 @@ ActiveRecord::Schema.define(version: 20180120033402) do t.integer "spoken_language_id" end + create_table "location_capital_towns", force: :cascade do |t| + t.integer "location_id" + t.integer "capital_town_id" + t.integer "user_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "location_capital_towns", ["location_id"], name: "index_location_capital_towns_on_location_id" + add_index "location_capital_towns", ["user_id"], name: "index_location_capital_towns_on_user_id" + + create_table "location_landmarks", force: :cascade do |t| + t.integer "location_id" + t.integer "landmark_id" + t.integer "user_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "location_landmarks", ["landmark_id"], name: "index_location_landmarks_on_landmark_id" + add_index "location_landmarks", ["location_id"], name: "index_location_landmarks_on_location_id" + add_index "location_landmarks", ["user_id"], name: "index_location_landmarks_on_user_id" + create_table "location_languageships", force: :cascade do |t| t.integer "user_id" t.integer "location_id" @@ -724,12 +1167,34 @@ ActiveRecord::Schema.define(version: 20180120033402) do t.datetime "updated_at", null: false end + create_table "location_largest_towns", force: :cascade do |t| + t.integer "location_id" + t.integer "largest_town_id" + t.integer "user_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "location_largest_towns", ["location_id"], name: "index_location_largest_towns_on_location_id" + add_index "location_largest_towns", ["user_id"], name: "index_location_largest_towns_on_user_id" + create_table "location_leaderships", force: :cascade do |t| t.integer "user_id" t.integer "location_id" t.integer "leader_id" end + create_table "location_notable_towns", force: :cascade do |t| + t.integer "location_id" + t.integer "notable_town_id" + t.integer "user_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "location_notable_towns", ["location_id"], name: "index_location_notable_towns_on_location_id" + add_index "location_notable_towns", ["user_id"], name: "index_location_notable_towns_on_user_id" + create_table "locations", force: :cascade do |t| t.string "name", null: false t.string "type_of" @@ -857,6 +1322,180 @@ ActiveRecord::Schema.define(version: 20180120033402) do t.integer "past_owner_id" end + create_table "planet_countries", force: :cascade do |t| + t.integer "user_id" + t.integer "planet_id" + t.integer "country_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "planet_countries", ["country_id"], name: "index_planet_countries_on_country_id" + add_index "planet_countries", ["planet_id"], name: "index_planet_countries_on_planet_id" + add_index "planet_countries", ["user_id"], name: "index_planet_countries_on_user_id" + + create_table "planet_creatures", force: :cascade do |t| + t.integer "user_id" + t.integer "planet_id" + t.integer "creature_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "planet_creatures", ["creature_id"], name: "index_planet_creatures_on_creature_id" + add_index "planet_creatures", ["planet_id"], name: "index_planet_creatures_on_planet_id" + add_index "planet_creatures", ["user_id"], name: "index_planet_creatures_on_user_id" + + create_table "planet_deities", force: :cascade do |t| + t.integer "user_id" + t.integer "planet_id" + t.integer "deity_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "planet_deities", ["deity_id"], name: "index_planet_deities_on_deity_id" + add_index "planet_deities", ["planet_id"], name: "index_planet_deities_on_planet_id" + add_index "planet_deities", ["user_id"], name: "index_planet_deities_on_user_id" + + create_table "planet_floras", force: :cascade do |t| + t.integer "user_id" + t.integer "planet_id" + t.integer "flora_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "planet_floras", ["flora_id"], name: "index_planet_floras_on_flora_id" + add_index "planet_floras", ["planet_id"], name: "index_planet_floras_on_planet_id" + add_index "planet_floras", ["user_id"], name: "index_planet_floras_on_user_id" + + create_table "planet_groups", force: :cascade do |t| + t.integer "user_id" + t.integer "planet_id" + t.integer "group_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "planet_groups", ["group_id"], name: "index_planet_groups_on_group_id" + add_index "planet_groups", ["planet_id"], name: "index_planet_groups_on_planet_id" + add_index "planet_groups", ["user_id"], name: "index_planet_groups_on_user_id" + + create_table "planet_landmarks", force: :cascade do |t| + t.integer "user_id" + t.integer "planet_id" + t.integer "landmark_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "planet_landmarks", ["landmark_id"], name: "index_planet_landmarks_on_landmark_id" + add_index "planet_landmarks", ["planet_id"], name: "index_planet_landmarks_on_planet_id" + add_index "planet_landmarks", ["user_id"], name: "index_planet_landmarks_on_user_id" + + create_table "planet_languages", force: :cascade do |t| + t.integer "user_id" + t.integer "planet_id" + t.integer "language_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "planet_languages", ["language_id"], name: "index_planet_languages_on_language_id" + add_index "planet_languages", ["planet_id"], name: "index_planet_languages_on_planet_id" + add_index "planet_languages", ["user_id"], name: "index_planet_languages_on_user_id" + + create_table "planet_locations", force: :cascade do |t| + t.integer "user_id" + t.integer "planet_id" + t.integer "location_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "planet_locations", ["location_id"], name: "index_planet_locations_on_location_id" + add_index "planet_locations", ["planet_id"], name: "index_planet_locations_on_planet_id" + add_index "planet_locations", ["user_id"], name: "index_planet_locations_on_user_id" + + create_table "planet_nearby_planets", force: :cascade do |t| + t.integer "user_id" + t.integer "planet_id" + t.integer "nearby_planet_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "planet_nearby_planets", ["planet_id"], name: "index_planet_nearby_planets_on_planet_id" + add_index "planet_nearby_planets", ["user_id"], name: "index_planet_nearby_planets_on_user_id" + + create_table "planet_races", force: :cascade do |t| + t.integer "user_id" + t.integer "planet_id" + t.integer "race_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "planet_races", ["planet_id"], name: "index_planet_races_on_planet_id" + add_index "planet_races", ["race_id"], name: "index_planet_races_on_race_id" + add_index "planet_races", ["user_id"], name: "index_planet_races_on_user_id" + + create_table "planet_religions", force: :cascade do |t| + t.integer "user_id" + t.integer "planet_id" + t.integer "religion_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "planet_religions", ["planet_id"], name: "index_planet_religions_on_planet_id" + add_index "planet_religions", ["religion_id"], name: "index_planet_religions_on_religion_id" + add_index "planet_religions", ["user_id"], name: "index_planet_religions_on_user_id" + + create_table "planet_towns", force: :cascade do |t| + t.integer "user_id" + t.integer "planet_id" + t.integer "town_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "planet_towns", ["planet_id"], name: "index_planet_towns_on_planet_id" + add_index "planet_towns", ["town_id"], name: "index_planet_towns_on_town_id" + add_index "planet_towns", ["user_id"], name: "index_planet_towns_on_user_id" + + create_table "planets", force: :cascade do |t| + t.string "name" + t.string "description" + t.string "size" + t.string "surface" + t.string "climate" + t.string "weather" + t.string "water_content" + t.string "natural_resources" + t.string "length_of_day" + t.string "length_of_night" + t.string "calendar_system" + t.string "population" + t.string "moons" + t.string "orbit" + t.string "visible_constellations" + t.string "first_inhabitants_story" + t.string "world_history" + t.string "private_notes" + t.string "privacy" + t.integer "universe_id" + t.integer "user_id" + t.datetime "deleted_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.string "notes" + end + + add_index "planets", ["universe_id"], name: "index_planets_on_universe_id" + add_index "planets", ["user_id"], name: "index_planets_on_user_id" + create_table "races", force: :cascade do |t| t.string "name" t.string "description" @@ -1059,6 +1698,152 @@ ActiveRecord::Schema.define(version: 20180120033402) do t.integer "supergroup_id" end + create_table "technologies", force: :cascade do |t| + t.string "name" + t.string "description" + t.string "other_names" + t.string "materials" + t.string "manufacturing_process" + t.string "sales_process" + t.string "cost" + t.string "rarity" + t.string "purpose" + t.string "how_it_works" + t.string "resources_used" + t.string "physical_description" + t.string "size" + t.string "weight" + t.string "colors" + t.string "notes" + t.string "private_notes" + t.string "privacy" + t.integer "user_id" + t.integer "universe_id" + t.datetime "deleted_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "technologies", ["universe_id"], name: "index_technologies_on_universe_id" + add_index "technologies", ["user_id"], name: "index_technologies_on_user_id" + + create_table "technology_characters", force: :cascade do |t| + t.integer "user_id" + t.integer "technology_id" + t.integer "character_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "technology_characters", ["character_id"], name: "index_technology_characters_on_character_id" + add_index "technology_characters", ["technology_id"], name: "index_technology_characters_on_technology_id" + add_index "technology_characters", ["user_id"], name: "index_technology_characters_on_user_id" + + create_table "technology_child_technologies", force: :cascade do |t| + t.integer "user_id" + t.integer "technology_id" + t.integer "child_technology_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "technology_child_technologies", ["technology_id"], name: "index_technology_child_technologies_on_technology_id" + add_index "technology_child_technologies", ["user_id"], name: "index_technology_child_technologies_on_user_id" + + create_table "technology_countries", force: :cascade do |t| + t.integer "user_id" + t.integer "technology_id" + t.integer "country_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "technology_countries", ["country_id"], name: "index_technology_countries_on_country_id" + add_index "technology_countries", ["technology_id"], name: "index_technology_countries_on_technology_id" + add_index "technology_countries", ["user_id"], name: "index_technology_countries_on_user_id" + + create_table "technology_creatures", force: :cascade do |t| + t.integer "user_id" + t.integer "technology_id" + t.integer "creature_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "technology_creatures", ["creature_id"], name: "index_technology_creatures_on_creature_id" + add_index "technology_creatures", ["technology_id"], name: "index_technology_creatures_on_technology_id" + add_index "technology_creatures", ["user_id"], name: "index_technology_creatures_on_user_id" + + create_table "technology_groups", force: :cascade do |t| + t.integer "user_id" + t.integer "technology_id" + t.integer "group_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "technology_groups", ["group_id"], name: "index_technology_groups_on_group_id" + add_index "technology_groups", ["technology_id"], name: "index_technology_groups_on_technology_id" + add_index "technology_groups", ["user_id"], name: "index_technology_groups_on_user_id" + + create_table "technology_magics", force: :cascade do |t| + t.integer "user_id" + t.integer "technology_id" + t.integer "magic_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "technology_magics", ["magic_id"], name: "index_technology_magics_on_magic_id" + add_index "technology_magics", ["technology_id"], name: "index_technology_magics_on_technology_id" + add_index "technology_magics", ["user_id"], name: "index_technology_magics_on_user_id" + + create_table "technology_parent_technologies", force: :cascade do |t| + t.integer "user_id" + t.integer "technology_id" + t.integer "parent_technology_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "technology_parent_technologies", ["technology_id"], name: "index_technology_parent_technologies_on_technology_id" + add_index "technology_parent_technologies", ["user_id"], name: "index_technology_parent_technologies_on_user_id" + + create_table "technology_planets", force: :cascade do |t| + t.integer "user_id" + t.integer "technology_id" + t.integer "planet_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "technology_planets", ["planet_id"], name: "index_technology_planets_on_planet_id" + add_index "technology_planets", ["technology_id"], name: "index_technology_planets_on_technology_id" + add_index "technology_planets", ["user_id"], name: "index_technology_planets_on_user_id" + + create_table "technology_related_technologies", force: :cascade do |t| + t.integer "user_id" + t.integer "technology_id" + t.integer "related_technology_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "technology_related_technologies", ["technology_id"], name: "index_technology_related_technologies_on_technology_id" + add_index "technology_related_technologies", ["user_id"], name: "index_technology_related_technologies_on_user_id" + + create_table "technology_towns", force: :cascade do |t| + t.integer "user_id" + t.integer "technology_id" + t.integer "town_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "technology_towns", ["technology_id"], name: "index_technology_towns_on_technology_id" + add_index "technology_towns", ["town_id"], name: "index_technology_towns_on_town_id" + add_index "technology_towns", ["user_id"], name: "index_technology_towns_on_user_id" + create_table "thredded_categories", force: :cascade do |t| t.integer "messageboard_id", null: false t.string "name", limit: 191, null: false @@ -1414,7 +2199,7 @@ ActiveRecord::Schema.define(version: 20180120033402) do t.datetime "updated_at" t.string "laws_of_physics" t.string "magic_system" - t.string "technologies" + t.string "technology" t.string "genre" t.datetime "deleted_at" end diff --git a/docs/content_types.md b/docs/content_types.md index febbe27b..75c41e97 100644 --- a/docs/content_types.md +++ b/docs/content_types.md @@ -4,35 +4,24 @@ Checklist to create a new content type: - e.g. https://github.com/indentlabs/notebook/issues/258 - Generate models (with non-relation fields) - - rails g model Character name:string - - (can probably merge this with the below soon) - - probably want to just put core attributes here eventually, after de-systemizing other fields + - rails g model Planet name:string description:string ... - don't forget to add `privacy`, `notes`, `private_notes`, `user_id`, `universe_id`, `deleted_at` + - probably want to just put core attributes here eventually, after de-systemizing other fields -- Move models from models/ to models/content_types/ -- Add concerns to new models (mirror existing models) - - Probably just want to move them all to a single concern that injects the others eventually -- Define `self.color`, `self.icon`, `self.content_name` +- Run `rake page_type:create` and type "Planet" at the prompt -- Generate CharactersController controller (inheriting from ContentController) - - define `content_params` and `content_param_list` - - use fields from the original list for the latter +- Edit app/models/content_types/planet.rb to define color and icon -- Add routes for the new content type - - `resources :characters` in /plan scope - - `get :characters, on: :member` in :universes resource - - csv routes under /export scope - - user-center routes under users resource +- Add has_many :planets to universe.rb - Add the content class to initializers/content_types.rb - most likely to :all, :available, and :free/:premium -- Add the `has_many` associations to `Universe` -- Add the `has_many` associations to the `HasContent` concern - - Find and add images to images/card-headers/ - resize to 600x400 and optimize size to <100kb, ideally <50kb +- Customize groupings in config/attributes/planet.yml + - Add translations to en.yml - class name translations under activerecord.models - activerecord.attributes if you need a different label than humanized string @@ -40,13 +29,6 @@ Checklist to create a new content type: - add line for each to content_oneliners - add content_descriptions (of relatively the same size) -- Add config/attributes/town.yml - -- Add hooks to ExportController - - Add links to export/index.html.erb -- Add links to `content` and `content_list` and `content_in_universe` and everything else in HasContent concern - - this totally needs refactored - - Give it a shot through the UI! :) - fill in each field to make sure all fields are working/permitted - make sure new/create and show/edit are working diff --git a/docs/creating_relationship.md b/docs/creating_relationship.md index a1af5583..36b95615 100644 --- a/docs/creating_relationship.md +++ b/docs/creating_relationship.md @@ -1,7 +1,7 @@ # Example of adding a "leaders" relation to Group ## Create migration -- rails g model GroupLeadership user_id:integer group_id:integer leader_id:integer +- rails g model GroupLeadership user:references group:references leader_id:integer - move model to models/content_groupers ## Migrate @@ -16,7 +16,7 @@ class GroupLeadership < ActiveRecord::Base belongs_to :user belongs_to :group - belongs_to :leader, class_name: 'Character' + belongs_to :leader, class_name: Character.name end ## Add attributes to whitelist in groups_controller.rb diff --git a/lib/tasks/page_type.rake b/lib/tasks/page_type.rake new file mode 100644 index 00000000..13a32d31 --- /dev/null +++ b/lib/tasks/page_type.rake @@ -0,0 +1,127 @@ +namespace :page_type do + desc "Do all the stuff" + task create: :environment do + puts "Please enter the page type model (e.g. Character or Planet): " + page_type = STDIN.gets.chomp + if klass = page_type.constantize + puts "Creating page type for #{page_type}" + else + puts "No model matches #{page_type}" + exit + end + + puts "Migrating database" + `rake db:migrate` + + editable_fields = klass.columns.map(&:name) - %w(id deleted_at created_at updated_at user_id) + editable_fields.map!(&:to_sym) + + # Move model from models/ to models/content_types/ + # (we write the file in the next step; this just removes the original) + puts "Removing base model at models/#{page_type.downcase}.rb" + `rm app/models/#{page_type.downcase}.rb` + + # Add concerns to new model + puts "Writing class definition to app/models/content_types/#{page_type.downcase}.rb" + #TODO: read from content_types/_template.erb or something? + class_definition = """ +class #{page_type} < ActiveRecord::Base + acts_as_paranoid + + belongs_to :user + validates :name, presence: true + validates :user_id, presence: true + + include BelongsToUniverse + include HasAttributes + include HasPrivacy + include HasContentGroupers + include HasImageUploads + include HasChangelog + include Serendipitous::Concern + + include Authority::Abilities + self.authorizer_name = 'ExtendedContentAuthorizer' + + def self.color + 'black' + end + + def self.icon + 'info' + end + + def self.content_name + '#{page_type.downcase}' + end +end + """ + File.open("app/models/content_types/#{page_type.downcase}.rb", 'w') do |file| + file.write(class_definition) + end + + puts "Writing controller definition" + controller_definition = """ +class #{page_type.pluralize}Controller < ContentController + private + + def content_param_list + [ + #{editable_fields.map { |f| ":#{f}" }.join(', ')} + ] + [ # + + ] + end +end + """ + File.open("app/controllers/#{page_type.downcase.pluralize}_controller.rb", 'w+') do |file| + file.write(controller_definition) + end + + puts "Writing routes" + routes = File.read("config/routes.rb") + + # Swap new routes in + routes.gsub!(/#/, "get :#{page_type.downcase.pluralize}, on: :member\n #") + routes.gsub!(/#/, "get :#{page_type.downcase.pluralize}, on: :member\n #") + routes.gsub!(/#/, "resources :#{page_type.downcase.pluralize}\n #") + + # Write new routes back to file + File.open("config/routes.rb", 'w') do |file| + file.write(routes) + end + + puts "Writing config/attributes/#{page_type.downcase}.yml" + attributes_template = """ +:overview: + :label: Overview + :icon: info + :attributes: +""" + + editable_fields.map do |field| + next if ["private_notes", "notes", "privacy", "universe_id"].include?(field) + " - :name: #{field.to_s}\n :label: #{field.to_s.titleize}" + end.compact.join("\n") + """ +:gallery: + :label: Gallery + :icon: photo_library +:changelog: + :label: Changelog + :icon: history +:notes: + :label: Notes + :icon: edit + :attributes: + - :name: notes + :label: Notes + - :name: private_notes + :label: Private Notes + :description: Private notes are always visible to only you, even if content is made public and shared. + """ + + File.open("config/attributes/#{page_type.downcase}.yml", 'w+') do |file| + file.write(attributes_template) + end + + end +end diff --git a/test/fixtures/character_birthtowns.yml b/test/fixtures/character_birthtowns.yml new file mode 100644 index 00000000..dcfc3bd9 --- /dev/null +++ b/test/fixtures/character_birthtowns.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + character_id: + birthtown_id: 1 + +two: + user_id: + character_id: + birthtown_id: 1 diff --git a/test/fixtures/character_companions.yml b/test/fixtures/character_companions.yml new file mode 100644 index 00000000..e5a297eb --- /dev/null +++ b/test/fixtures/character_companions.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + character_id: + companion_id: 1 + +two: + user_id: + character_id: + companion_id: 1 diff --git a/test/fixtures/character_enemies.yml b/test/fixtures/character_enemies.yml new file mode 100644 index 00000000..146e834e --- /dev/null +++ b/test/fixtures/character_enemies.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + characters_id: + enemy_id: 1 + user_id: + +two: + characters_id: + enemy_id: 1 + user_id: diff --git a/test/fixtures/character_floras.yml b/test/fixtures/character_floras.yml new file mode 100644 index 00000000..62f3bf23 --- /dev/null +++ b/test/fixtures/character_floras.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + character_id: + flora_id: + +two: + user_id: + character_id: + flora_id: diff --git a/test/fixtures/character_friends.yml b/test/fixtures/character_friends.yml new file mode 100644 index 00000000..3d364c6d --- /dev/null +++ b/test/fixtures/character_friends.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + character_id: + friend_id: 1 + +two: + user_id: + character_id: + friend_id: 1 diff --git a/test/fixtures/character_items.yml b/test/fixtures/character_items.yml new file mode 100644 index 00000000..8434d12c --- /dev/null +++ b/test/fixtures/character_items.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + character_id: + item_id: + +two: + user_id: + character_id: + item_id: diff --git a/test/fixtures/character_magics.yml b/test/fixtures/character_magics.yml new file mode 100644 index 00000000..dd01d1a9 --- /dev/null +++ b/test/fixtures/character_magics.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + character_id: + magic_id: + user_id: + +two: + character_id: + magic_id: + user_id: diff --git a/test/fixtures/character_technologies.yml b/test/fixtures/character_technologies.yml new file mode 100644 index 00000000..4ab0aa32 --- /dev/null +++ b/test/fixtures/character_technologies.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + character_id: + technology_id: + +two: + user_id: + character_id: + technology_id: diff --git a/test/fixtures/country_governments.yml b/test/fixtures/country_governments.yml new file mode 100644 index 00000000..443388f9 --- /dev/null +++ b/test/fixtures/country_governments.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + country_id: + government_id: + user_id: + +two: + country_id: + government_id: + user_id: diff --git a/test/fixtures/deities.yml b/test/fixtures/deities.yml new file mode 100644 index 00000000..f3d15f1f --- /dev/null +++ b/test/fixtures/deities.yml @@ -0,0 +1,49 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + name: MyString + description: MyString + other_names: MyString + physical_description: MyString + height: MyString + weight: MyString + symbols: MyString + elements: MyString + strengths: MyString + weaknesses: MyString + prayers: MyString + rituals: MyString + human_interaction: MyString + notable_events: MyString + family_history: MyString + life_story: MyString + notes: MyString + private_notes: MyString + privacy: MyString + user_id: + universe_id: + deleted_at: 2018-01-27 14:21:20 + +two: + name: MyString + description: MyString + other_names: MyString + physical_description: MyString + height: MyString + weight: MyString + symbols: MyString + elements: MyString + strengths: MyString + weaknesses: MyString + prayers: MyString + rituals: MyString + human_interaction: MyString + notable_events: MyString + family_history: MyString + life_story: MyString + notes: MyString + private_notes: MyString + privacy: MyString + user_id: + universe_id: + deleted_at: 2018-01-27 14:21:20 diff --git a/test/fixtures/deity_abilities.yml b/test/fixtures/deity_abilities.yml new file mode 100644 index 00000000..8bf4a612 --- /dev/null +++ b/test/fixtures/deity_abilities.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + deity_id: + ability_id: 1 + +two: + user_id: + deity_id: + ability_id: 1 diff --git a/test/fixtures/deity_character_children.yml b/test/fixtures/deity_character_children.yml new file mode 100644 index 00000000..b3f35224 --- /dev/null +++ b/test/fixtures/deity_character_children.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + deity_id: + character_child_id: 1 + +two: + user_id: + deity_id: + character_child_id: 1 diff --git a/test/fixtures/deity_character_parents.yml b/test/fixtures/deity_character_parents.yml new file mode 100644 index 00000000..f769bd81 --- /dev/null +++ b/test/fixtures/deity_character_parents.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + deity_id: + character_parent_id: 1 + +two: + user_id: + deity_id: + character_parent_id: 1 diff --git a/test/fixtures/deity_character_partners.yml b/test/fixtures/deity_character_partners.yml new file mode 100644 index 00000000..f5e633cf --- /dev/null +++ b/test/fixtures/deity_character_partners.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + deity_id: + character_partner_id: 1 + +two: + user_id: + deity_id: + character_partner_id: 1 diff --git a/test/fixtures/deity_creatures.yml b/test/fixtures/deity_creatures.yml new file mode 100644 index 00000000..7bea1c3a --- /dev/null +++ b/test/fixtures/deity_creatures.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + deity_id: + creature_id: + +two: + user_id: + deity_id: + creature_id: diff --git a/test/fixtures/deity_deity_children.yml b/test/fixtures/deity_deity_children.yml new file mode 100644 index 00000000..e9f15b4a --- /dev/null +++ b/test/fixtures/deity_deity_children.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + deity_id: + deity_child_id: 1 + +two: + user_id: + deity_id: + deity_child_id: 1 diff --git a/test/fixtures/deity_deity_parents.yml b/test/fixtures/deity_deity_parents.yml new file mode 100644 index 00000000..58efbb37 --- /dev/null +++ b/test/fixtures/deity_deity_parents.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + deity_id: + deity_parent_id: 1 + +two: + user_id: + deity_id: + deity_parent_id: 1 diff --git a/test/fixtures/deity_deity_partners.yml b/test/fixtures/deity_deity_partners.yml new file mode 100644 index 00000000..cf5ceb5b --- /dev/null +++ b/test/fixtures/deity_deity_partners.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + deity_id: + deity_partner_id: 1 + +two: + user_id: + deity_id: + deity_partner_id: 1 diff --git a/test/fixtures/deity_floras.yml b/test/fixtures/deity_floras.yml new file mode 100644 index 00000000..baecf5fa --- /dev/null +++ b/test/fixtures/deity_floras.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + deity_id: + flora_id: + +two: + user_id: + deity_id: + flora_id: diff --git a/test/fixtures/deity_related_landmarks.yml b/test/fixtures/deity_related_landmarks.yml new file mode 100644 index 00000000..eff52430 --- /dev/null +++ b/test/fixtures/deity_related_landmarks.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + deity_id: + related_landmark_id: 1 + +two: + user_id: + deity_id: + related_landmark_id: 1 diff --git a/test/fixtures/deity_related_towns.yml b/test/fixtures/deity_related_towns.yml new file mode 100644 index 00000000..ae9d86e4 --- /dev/null +++ b/test/fixtures/deity_related_towns.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + deity_id: + related_town_id: 1 + +two: + user_id: + deity_id: + related_town_id: 1 diff --git a/test/fixtures/deity_relics.yml b/test/fixtures/deity_relics.yml new file mode 100644 index 00000000..0b9331d9 --- /dev/null +++ b/test/fixtures/deity_relics.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + deity_id: + relic_id: 1 + +two: + user_id: + deity_id: + relic_id: 1 diff --git a/test/fixtures/deity_religions.yml b/test/fixtures/deity_religions.yml new file mode 100644 index 00000000..052d3fa6 --- /dev/null +++ b/test/fixtures/deity_religions.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + deity_id: + religion_id: + +two: + user_id: + deity_id: + religion_id: diff --git a/test/fixtures/government_creatures.yml b/test/fixtures/government_creatures.yml new file mode 100644 index 00000000..ac319446 --- /dev/null +++ b/test/fixtures/government_creatures.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + government_id: + creature_id: + +two: + user_id: + government_id: + creature_id: diff --git a/test/fixtures/government_groups.yml b/test/fixtures/government_groups.yml new file mode 100644 index 00000000..e65e69da --- /dev/null +++ b/test/fixtures/government_groups.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + government_id: + group_id: + +two: + user_id: + government_id: + group_id: diff --git a/test/fixtures/government_items.yml b/test/fixtures/government_items.yml new file mode 100644 index 00000000..69a685c9 --- /dev/null +++ b/test/fixtures/government_items.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + government_id: + item_id: + +two: + user_id: + government_id: + item_id: diff --git a/test/fixtures/government_leaders.yml b/test/fixtures/government_leaders.yml new file mode 100644 index 00000000..4275bb52 --- /dev/null +++ b/test/fixtures/government_leaders.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + government_id: + leader_id: 1 + +two: + user_id: + government_id: + leader_id: 1 diff --git a/test/fixtures/government_political_figures.yml b/test/fixtures/government_political_figures.yml new file mode 100644 index 00000000..dc4dfb6b --- /dev/null +++ b/test/fixtures/government_political_figures.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + government_id: + political_figure_id: 1 + +two: + user_id: + government_id: + political_figure_id: 1 diff --git a/test/fixtures/government_technologies.yml b/test/fixtures/government_technologies.yml new file mode 100644 index 00000000..e08f2a23 --- /dev/null +++ b/test/fixtures/government_technologies.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + government_id: + technology_id: + +two: + user_id: + government_id: + technology_id: diff --git a/test/fixtures/governments.yml b/test/fixtures/governments.yml new file mode 100644 index 00000000..293b882e --- /dev/null +++ b/test/fixtures/governments.yml @@ -0,0 +1,67 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + name: MyString + description: MyString + type_of_government: MyString + power_structure: MyString + power_source: MyString + checks_and_balances: MyString + sociopolitical: MyString + socioeconomical: MyString + geocultural: MyString + laws: MyString + immigration: MyString + privacy_ideologies: MyString + electoral_process: MyString + term_lengths: MyString + criminal_system: MyString + approval_ratings: MyString + military: MyString + navy: MyString + airforce: MyString + space_program: MyString + international_relations: MyString + civilian_life: MyString + founding_story: MyString + flag_design_story: MyString + notable_wars: MyString + notes: MyString + private_notes: MyString + privacy: MyString + user_id: + universe_id: + deleted_at: 2018-01-27 14:31:30 + +two: + name: MyString + description: MyString + type_of_government: MyString + power_structure: MyString + power_source: MyString + checks_and_balances: MyString + sociopolitical: MyString + socioeconomical: MyString + geocultural: MyString + laws: MyString + immigration: MyString + privacy_ideologies: MyString + electoral_process: MyString + term_lengths: MyString + criminal_system: MyString + approval_ratings: MyString + military: MyString + navy: MyString + airforce: MyString + space_program: MyString + international_relations: MyString + civilian_life: MyString + founding_story: MyString + flag_design_story: MyString + notable_wars: MyString + notes: MyString + private_notes: MyString + privacy: MyString + user_id: + universe_id: + deleted_at: 2018-01-27 14:31:30 diff --git a/test/fixtures/group_creatures.yml b/test/fixtures/group_creatures.yml new file mode 100644 index 00000000..2d89b5e8 --- /dev/null +++ b/test/fixtures/group_creatures.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + group_id: + creature_id: + user_id: + +two: + group_id: + creature_id: + user_id: diff --git a/test/fixtures/item_magics.yml b/test/fixtures/item_magics.yml new file mode 100644 index 00000000..7aad1638 --- /dev/null +++ b/test/fixtures/item_magics.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + item_id: + magic_id: + user_id: + +two: + item_id: + magic_id: + user_id: diff --git a/test/fixtures/location_capital_towns.yml b/test/fixtures/location_capital_towns.yml new file mode 100644 index 00000000..4bd5c8a9 --- /dev/null +++ b/test/fixtures/location_capital_towns.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + location_id: + capital_town_id: 1 + user_id: + +two: + location_id: + capital_town_id: 1 + user_id: diff --git a/test/fixtures/location_landmarks.yml b/test/fixtures/location_landmarks.yml new file mode 100644 index 00000000..72a5c0c4 --- /dev/null +++ b/test/fixtures/location_landmarks.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + location_id: + landmark_id: + user_id: + +two: + location_id: + landmark_id: + user_id: diff --git a/test/fixtures/location_largest_towns.yml b/test/fixtures/location_largest_towns.yml new file mode 100644 index 00000000..6d9c78a1 --- /dev/null +++ b/test/fixtures/location_largest_towns.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + location_id: + largest_town_id: 1 + user_id: + +two: + location_id: + largest_town_id: 1 + user_id: diff --git a/test/fixtures/location_notable_towns.yml b/test/fixtures/location_notable_towns.yml new file mode 100644 index 00000000..4b52579c --- /dev/null +++ b/test/fixtures/location_notable_towns.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + location_id: + notable_town_id: 1 + user_id: + +two: + location_id: + notable_town_id: 1 + user_id: diff --git a/test/fixtures/planet_countries.yml b/test/fixtures/planet_countries.yml new file mode 100644 index 00000000..85ecf91b --- /dev/null +++ b/test/fixtures/planet_countries.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + planet_id: + country_id: + +two: + user_id: + planet_id: + country_id: diff --git a/test/fixtures/planet_creatures.yml b/test/fixtures/planet_creatures.yml new file mode 100644 index 00000000..749be7e9 --- /dev/null +++ b/test/fixtures/planet_creatures.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + planet_id: + creature_id: + +two: + user_id: + planet_id: + creature_id: diff --git a/test/fixtures/planet_deities.yml b/test/fixtures/planet_deities.yml new file mode 100644 index 00000000..3418a3b8 --- /dev/null +++ b/test/fixtures/planet_deities.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + planet_id: + deity_id: + +two: + user_id: + planet_id: + deity_id: diff --git a/test/fixtures/planet_floras.yml b/test/fixtures/planet_floras.yml new file mode 100644 index 00000000..ab0431e9 --- /dev/null +++ b/test/fixtures/planet_floras.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + planet_id: + flora_id: + +two: + user_id: + planet_id: + flora_id: diff --git a/test/fixtures/planet_groups.yml b/test/fixtures/planet_groups.yml new file mode 100644 index 00000000..aab08f91 --- /dev/null +++ b/test/fixtures/planet_groups.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + planet_id: + group_id: + +two: + user_id: + planet_id: + group_id: diff --git a/test/fixtures/planet_landmarks.yml b/test/fixtures/planet_landmarks.yml new file mode 100644 index 00000000..41f5b1c8 --- /dev/null +++ b/test/fixtures/planet_landmarks.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + planet_id: + landmark_id: + +two: + user_id: + planet_id: + landmark_id: diff --git a/test/fixtures/planet_languages.yml b/test/fixtures/planet_languages.yml new file mode 100644 index 00000000..cfc1a181 --- /dev/null +++ b/test/fixtures/planet_languages.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + planet_id: + language_id: + +two: + user_id: + planet_id: + language_id: diff --git a/test/fixtures/planet_locations.yml b/test/fixtures/planet_locations.yml new file mode 100644 index 00000000..b791d7f4 --- /dev/null +++ b/test/fixtures/planet_locations.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + planet_id: + location_id: + +two: + user_id: + planet_id: + location_id: diff --git a/test/fixtures/planet_nearby_planets.yml b/test/fixtures/planet_nearby_planets.yml new file mode 100644 index 00000000..ef05749b --- /dev/null +++ b/test/fixtures/planet_nearby_planets.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + planet_id: + nearby_planet_id: 1 + +two: + user_id: + planet_id: + nearby_planet_id: 1 diff --git a/test/fixtures/planet_races.yml b/test/fixtures/planet_races.yml new file mode 100644 index 00000000..66f2eb60 --- /dev/null +++ b/test/fixtures/planet_races.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + planet_id: + race_id: + +two: + user_id: + planet_id: + race_id: diff --git a/test/fixtures/planet_religions.yml b/test/fixtures/planet_religions.yml new file mode 100644 index 00000000..72eb580f --- /dev/null +++ b/test/fixtures/planet_religions.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + planet_id: + religion_id: + +two: + user_id: + planet_id: + religion_id: diff --git a/test/fixtures/planet_towns.yml b/test/fixtures/planet_towns.yml new file mode 100644 index 00000000..9d0a16dd --- /dev/null +++ b/test/fixtures/planet_towns.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + planet_id: + town_id: + +two: + user_id: + planet_id: + town_id: diff --git a/test/fixtures/planets.yml b/test/fixtures/planets.yml new file mode 100644 index 00000000..204eb21f --- /dev/null +++ b/test/fixtures/planets.yml @@ -0,0 +1,53 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + name: MyString + description: MyString + size: MyString + surface: MyString + landmarks: MyString + climate: MyString + weather: MyString + water_content: MyString + natural_resources: MyString + length_of_day: MyString + length_of_night: MyString + calendar_system: MyString + population: MyString + moons: MyString + orbit: MyString + visible_constellations: MyString + first_inhabitants_story: MyString + world_history: MyString + public_notes: MyString + private_notes: MyString + privacy: MyString + universe_id: + user_id: + deleted_at: 2018-01-26 23:57:30 + +two: + name: MyString + description: MyString + size: MyString + surface: MyString + landmarks: MyString + climate: MyString + weather: MyString + water_content: MyString + natural_resources: MyString + length_of_day: MyString + length_of_night: MyString + calendar_system: MyString + population: MyString + moons: MyString + orbit: MyString + visible_constellations: MyString + first_inhabitants_story: MyString + world_history: MyString + public_notes: MyString + private_notes: MyString + privacy: MyString + universe_id: + user_id: + deleted_at: 2018-01-26 23:57:30 diff --git a/test/fixtures/technologies.yml b/test/fixtures/technologies.yml new file mode 100644 index 00000000..cbcadf11 --- /dev/null +++ b/test/fixtures/technologies.yml @@ -0,0 +1,47 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + name: MyString + description: MyString + other_names: MyString + materials: MyString + manufacturing_process: MyString + sales_process: MyString + cost: MyString + rarity: MyString + purpose: MyString + how_it_works: MyString + resources_used: MyString + physical_description: MyString + size: MyString + weight: MyString + colors: MyString + notes: MyString + private_notes: MyString + privacy: MyString + user_id: + universe_id: + deleted_at: 2018-01-27 14:07:09 + +two: + name: MyString + description: MyString + other_names: MyString + materials: MyString + manufacturing_process: MyString + sales_process: MyString + cost: MyString + rarity: MyString + purpose: MyString + how_it_works: MyString + resources_used: MyString + physical_description: MyString + size: MyString + weight: MyString + colors: MyString + notes: MyString + private_notes: MyString + privacy: MyString + user_id: + universe_id: + deleted_at: 2018-01-27 14:07:09 diff --git a/test/fixtures/technology_characters.yml b/test/fixtures/technology_characters.yml new file mode 100644 index 00000000..87bd2361 --- /dev/null +++ b/test/fixtures/technology_characters.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + technology_id: + character_id: + +two: + user_id: + technology_id: + character_id: diff --git a/test/fixtures/technology_child_technologies.yml b/test/fixtures/technology_child_technologies.yml new file mode 100644 index 00000000..1f521bc3 --- /dev/null +++ b/test/fixtures/technology_child_technologies.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + technology_id: + child_technology_id: 1 + +two: + user_id: + technology_id: + child_technology_id: 1 diff --git a/test/fixtures/technology_countries.yml b/test/fixtures/technology_countries.yml new file mode 100644 index 00000000..cb6b833b --- /dev/null +++ b/test/fixtures/technology_countries.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + technology_id: + country_id: + +two: + user_id: + technology_id: + country_id: diff --git a/test/fixtures/technology_creatures.yml b/test/fixtures/technology_creatures.yml new file mode 100644 index 00000000..16584f9c --- /dev/null +++ b/test/fixtures/technology_creatures.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + technology_id: + creature_id: + +two: + user_id: + technology_id: + creature_id: diff --git a/test/fixtures/technology_groups.yml b/test/fixtures/technology_groups.yml new file mode 100644 index 00000000..06bd3e5f --- /dev/null +++ b/test/fixtures/technology_groups.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + technology_id: + group_id: + +two: + user_id: + technology_id: + group_id: diff --git a/test/fixtures/technology_magics.yml b/test/fixtures/technology_magics.yml new file mode 100644 index 00000000..6c10356e --- /dev/null +++ b/test/fixtures/technology_magics.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + technology_id: + magic_id: + +two: + user_id: + technology_id: + magic_id: diff --git a/test/fixtures/technology_parent_technologies.yml b/test/fixtures/technology_parent_technologies.yml new file mode 100644 index 00000000..abcb3227 --- /dev/null +++ b/test/fixtures/technology_parent_technologies.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + technology_id: + parent_technology_id: 1 + +two: + user_id: + technology_id: + parent_technology_id: 1 diff --git a/test/fixtures/technology_planets.yml b/test/fixtures/technology_planets.yml new file mode 100644 index 00000000..68dbb157 --- /dev/null +++ b/test/fixtures/technology_planets.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + technology_id: + planet_id: + +two: + user_id: + technology_id: + planet_id: diff --git a/test/fixtures/technology_related_technologies.yml b/test/fixtures/technology_related_technologies.yml new file mode 100644 index 00000000..657e8d15 --- /dev/null +++ b/test/fixtures/technology_related_technologies.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + technology_id: + related_technology_id: 1 + +two: + user_id: + technology_id: + related_technology_id: 1 diff --git a/test/fixtures/technology_towns.yml b/test/fixtures/technology_towns.yml new file mode 100644 index 00000000..73b2a427 --- /dev/null +++ b/test/fixtures/technology_towns.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + user_id: + technology_id: + town_id: + +two: + user_id: + technology_id: + town_id: diff --git a/test/models/character_birthtown_test.rb b/test/models/character_birthtown_test.rb new file mode 100644 index 00000000..a42deffb --- /dev/null +++ b/test/models/character_birthtown_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class CharacterBirthtownTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/character_companion_test.rb b/test/models/character_companion_test.rb new file mode 100644 index 00000000..89662fc9 --- /dev/null +++ b/test/models/character_companion_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class CharacterCompanionTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/character_enemy_test.rb b/test/models/character_enemy_test.rb new file mode 100644 index 00000000..cae2a620 --- /dev/null +++ b/test/models/character_enemy_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class CharacterEnemyTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/character_flora_test.rb b/test/models/character_flora_test.rb new file mode 100644 index 00000000..3eb19b06 --- /dev/null +++ b/test/models/character_flora_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class CharacterFloraTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/character_friend_test.rb b/test/models/character_friend_test.rb new file mode 100644 index 00000000..839aca1e --- /dev/null +++ b/test/models/character_friend_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class CharacterFriendTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/character_item_test.rb b/test/models/character_item_test.rb new file mode 100644 index 00000000..6e97ee09 --- /dev/null +++ b/test/models/character_item_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class CharacterItemTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/character_magic_test.rb b/test/models/character_magic_test.rb new file mode 100644 index 00000000..c26cc54e --- /dev/null +++ b/test/models/character_magic_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class CharacterMagicTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/character_technology_test.rb b/test/models/character_technology_test.rb new file mode 100644 index 00000000..7041393b --- /dev/null +++ b/test/models/character_technology_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class CharacterTechnologyTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/country_government_test.rb b/test/models/country_government_test.rb new file mode 100644 index 00000000..6183f8fd --- /dev/null +++ b/test/models/country_government_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class CountryGovernmentTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/deity_ability_test.rb b/test/models/deity_ability_test.rb new file mode 100644 index 00000000..016e1dc8 --- /dev/null +++ b/test/models/deity_ability_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class DeityAbilityTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/deity_character_child_test.rb b/test/models/deity_character_child_test.rb new file mode 100644 index 00000000..45050a80 --- /dev/null +++ b/test/models/deity_character_child_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class DeityCharacterChildTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/deity_character_parent_test.rb b/test/models/deity_character_parent_test.rb new file mode 100644 index 00000000..cfcd34c1 --- /dev/null +++ b/test/models/deity_character_parent_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class DeityCharacterParentTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/deity_character_partner_test.rb b/test/models/deity_character_partner_test.rb new file mode 100644 index 00000000..a733a0c1 --- /dev/null +++ b/test/models/deity_character_partner_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class DeityCharacterPartnerTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/deity_creature_test.rb b/test/models/deity_creature_test.rb new file mode 100644 index 00000000..988ad183 --- /dev/null +++ b/test/models/deity_creature_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class DeityCreatureTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/deity_deity_child_test.rb b/test/models/deity_deity_child_test.rb new file mode 100644 index 00000000..b506739d --- /dev/null +++ b/test/models/deity_deity_child_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class DeityDeityChildTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/deity_deity_parent_test.rb b/test/models/deity_deity_parent_test.rb new file mode 100644 index 00000000..105542e7 --- /dev/null +++ b/test/models/deity_deity_parent_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class DeityDeityParentTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/deity_deity_partner_test.rb b/test/models/deity_deity_partner_test.rb new file mode 100644 index 00000000..10e8e590 --- /dev/null +++ b/test/models/deity_deity_partner_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class DeityDeityPartnerTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/deity_flora_test.rb b/test/models/deity_flora_test.rb new file mode 100644 index 00000000..269a4203 --- /dev/null +++ b/test/models/deity_flora_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class DeityFloraTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/deity_related_landmark_test.rb b/test/models/deity_related_landmark_test.rb new file mode 100644 index 00000000..7768aec9 --- /dev/null +++ b/test/models/deity_related_landmark_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class DeityRelatedLandmarkTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/deity_related_town_test.rb b/test/models/deity_related_town_test.rb new file mode 100644 index 00000000..186ab77e --- /dev/null +++ b/test/models/deity_related_town_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class DeityRelatedTownTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/deity_relic_test.rb b/test/models/deity_relic_test.rb new file mode 100644 index 00000000..64c326d7 --- /dev/null +++ b/test/models/deity_relic_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class DeityRelicTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/deity_religion_test.rb b/test/models/deity_religion_test.rb new file mode 100644 index 00000000..1fa3b991 --- /dev/null +++ b/test/models/deity_religion_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class DeityReligionTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/deity_test.rb b/test/models/deity_test.rb new file mode 100644 index 00000000..dfe1653d --- /dev/null +++ b/test/models/deity_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class DeityTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/government_creature_test.rb b/test/models/government_creature_test.rb new file mode 100644 index 00000000..5f0230a6 --- /dev/null +++ b/test/models/government_creature_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class GovernmentCreatureTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/government_group_test.rb b/test/models/government_group_test.rb new file mode 100644 index 00000000..b3f2e105 --- /dev/null +++ b/test/models/government_group_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class GovernmentGroupTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/government_item_test.rb b/test/models/government_item_test.rb new file mode 100644 index 00000000..a2b81848 --- /dev/null +++ b/test/models/government_item_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class GovernmentItemTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/government_leader_test.rb b/test/models/government_leader_test.rb new file mode 100644 index 00000000..0104bf3f --- /dev/null +++ b/test/models/government_leader_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class GovernmentLeaderTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/government_political_figure_test.rb b/test/models/government_political_figure_test.rb new file mode 100644 index 00000000..700e10e9 --- /dev/null +++ b/test/models/government_political_figure_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class GovernmentPoliticalFigureTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/government_technology_test.rb b/test/models/government_technology_test.rb new file mode 100644 index 00000000..3c6306d8 --- /dev/null +++ b/test/models/government_technology_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class GovernmentTechnologyTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/government_test.rb b/test/models/government_test.rb new file mode 100644 index 00000000..ccef3af6 --- /dev/null +++ b/test/models/government_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class GovernmentTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/group_creature_test.rb b/test/models/group_creature_test.rb new file mode 100644 index 00000000..8f78f567 --- /dev/null +++ b/test/models/group_creature_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class GroupCreatureTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/item_magic_test.rb b/test/models/item_magic_test.rb new file mode 100644 index 00000000..a97ac6f5 --- /dev/null +++ b/test/models/item_magic_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class ItemMagicTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/location_capital_town_test.rb b/test/models/location_capital_town_test.rb new file mode 100644 index 00000000..32bf326e --- /dev/null +++ b/test/models/location_capital_town_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class LocationCapitalTownTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/location_landmark_test.rb b/test/models/location_landmark_test.rb new file mode 100644 index 00000000..ad122632 --- /dev/null +++ b/test/models/location_landmark_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class LocationLandmarkTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/location_largest_town_test.rb b/test/models/location_largest_town_test.rb new file mode 100644 index 00000000..f3678b1c --- /dev/null +++ b/test/models/location_largest_town_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class LocationLargestTownTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/location_notable_town_test.rb b/test/models/location_notable_town_test.rb new file mode 100644 index 00000000..a4ecf0a9 --- /dev/null +++ b/test/models/location_notable_town_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class LocationNotableTownTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/planet_country_test.rb b/test/models/planet_country_test.rb new file mode 100644 index 00000000..19050c8a --- /dev/null +++ b/test/models/planet_country_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class PlanetCountryTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/planet_creature_test.rb b/test/models/planet_creature_test.rb new file mode 100644 index 00000000..160938ea --- /dev/null +++ b/test/models/planet_creature_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class PlanetCreatureTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/planet_deity_test.rb b/test/models/planet_deity_test.rb new file mode 100644 index 00000000..e01bee62 --- /dev/null +++ b/test/models/planet_deity_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class PlanetDeityTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/planet_flora_test.rb b/test/models/planet_flora_test.rb new file mode 100644 index 00000000..c9613d78 --- /dev/null +++ b/test/models/planet_flora_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class PlanetFloraTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/planet_group_test.rb b/test/models/planet_group_test.rb new file mode 100644 index 00000000..4e75d335 --- /dev/null +++ b/test/models/planet_group_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class PlanetGroupTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/planet_landmark_test.rb b/test/models/planet_landmark_test.rb new file mode 100644 index 00000000..4ec4c4f1 --- /dev/null +++ b/test/models/planet_landmark_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class PlanetLandmarkTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/planet_language_test.rb b/test/models/planet_language_test.rb new file mode 100644 index 00000000..65acf3b9 --- /dev/null +++ b/test/models/planet_language_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class PlanetLanguageTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/planet_location_test.rb b/test/models/planet_location_test.rb new file mode 100644 index 00000000..aac7969e --- /dev/null +++ b/test/models/planet_location_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class PlanetLocationTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/planet_nearby_planet_test.rb b/test/models/planet_nearby_planet_test.rb new file mode 100644 index 00000000..19a6a640 --- /dev/null +++ b/test/models/planet_nearby_planet_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class PlanetNearbyPlanetTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/planet_race_test.rb b/test/models/planet_race_test.rb new file mode 100644 index 00000000..8fb0459b --- /dev/null +++ b/test/models/planet_race_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class PlanetRaceTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/planet_religion_test.rb b/test/models/planet_religion_test.rb new file mode 100644 index 00000000..bf34e29d --- /dev/null +++ b/test/models/planet_religion_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class PlanetReligionTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/planet_test.rb b/test/models/planet_test.rb new file mode 100644 index 00000000..21015ec7 --- /dev/null +++ b/test/models/planet_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class PlanetTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/planet_town_test.rb b/test/models/planet_town_test.rb new file mode 100644 index 00000000..00822d35 --- /dev/null +++ b/test/models/planet_town_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class PlanetTownTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/technology_character_test.rb b/test/models/technology_character_test.rb new file mode 100644 index 00000000..602b0500 --- /dev/null +++ b/test/models/technology_character_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class TechnologyCharacterTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/technology_child_technology_test.rb b/test/models/technology_child_technology_test.rb new file mode 100644 index 00000000..3e00cfdd --- /dev/null +++ b/test/models/technology_child_technology_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class TechnologyChildTechnologyTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/technology_country_test.rb b/test/models/technology_country_test.rb new file mode 100644 index 00000000..216c32af --- /dev/null +++ b/test/models/technology_country_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class TechnologyCountryTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/technology_creature_test.rb b/test/models/technology_creature_test.rb new file mode 100644 index 00000000..10d0f0e6 --- /dev/null +++ b/test/models/technology_creature_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class TechnologyCreatureTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/technology_group_test.rb b/test/models/technology_group_test.rb new file mode 100644 index 00000000..d214303d --- /dev/null +++ b/test/models/technology_group_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class TechnologyGroupTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/technology_magic_test.rb b/test/models/technology_magic_test.rb new file mode 100644 index 00000000..560ad2d5 --- /dev/null +++ b/test/models/technology_magic_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class TechnologyMagicTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/technology_parent_technology_test.rb b/test/models/technology_parent_technology_test.rb new file mode 100644 index 00000000..49b52e06 --- /dev/null +++ b/test/models/technology_parent_technology_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class TechnologyParentTechnologyTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/technology_planet_test.rb b/test/models/technology_planet_test.rb new file mode 100644 index 00000000..ce94fb6f --- /dev/null +++ b/test/models/technology_planet_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class TechnologyPlanetTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/technology_related_technology_test.rb b/test/models/technology_related_technology_test.rb new file mode 100644 index 00000000..d3238913 --- /dev/null +++ b/test/models/technology_related_technology_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class TechnologyRelatedTechnologyTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/technology_test.rb b/test/models/technology_test.rb new file mode 100644 index 00000000..efafc631 --- /dev/null +++ b/test/models/technology_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class TechnologyTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/technology_town_test.rb b/test/models/technology_town_test.rb new file mode 100644 index 00000000..19120857 --- /dev/null +++ b/test/models/technology_town_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class TechnologyTownTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end