diff --git a/.tool-versions b/.tool-versions index dcacdebe..0d371532 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -ruby 2.3.0 +ruby 2.5.1 diff --git a/Gemfile b/Gemfile index 2c632a2e..c7c6fac9 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' ruby "~> 2.5" -gem 'rails', '~> 4.2' +gem 'rails', '~> 5.2' gem 'puma', '~> 3.7' gem 'puma-heroku' gem 'rack-timeout' @@ -70,6 +70,9 @@ gem 'thredded' gem 'rails-ujs' gem 'delayed_job_active_record' +# Exports +gem 'csv' + # Tech debt & hacks gem 'binding_of_caller' # see has_changelog.rb @@ -110,6 +113,7 @@ group :test do gem 'rubocop', require: false gem 'ruby-prof', '0.15.9' gem 'shoulda-matchers', '~> 3.1' + gem 'rails-controller-testing' end group :test, :development do diff --git a/Gemfile.lock b/Gemfile.lock index 052a2579..4ceb8f33 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,45 +7,52 @@ GIT GEM remote: https://rubygems.org/ specs: - actionmailer (4.2.10) - actionpack (= 4.2.10) - actionview (= 4.2.10) - activejob (= 4.2.10) + actioncable (5.2.0) + actionpack (= 5.2.0) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + actionmailer (5.2.0) + actionpack (= 5.2.0) + actionview (= 5.2.0) + activejob (= 5.2.0) mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.10) - actionview (= 4.2.10) - activesupport (= 4.2.10) - rack (~> 1.6) - rack-test (~> 0.6.2) - rails-dom-testing (~> 1.0, >= 1.0.5) + rails-dom-testing (~> 2.0) + actionpack (5.2.0) + actionview (= 5.2.0) + activesupport (= 5.2.0) + rack (~> 2.0) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (4.2.10) - activesupport (= 4.2.10) + actionview (5.2.0) + activesupport (= 5.2.0) builder (~> 3.1) - erubis (~> 2.7.0) - rails-dom-testing (~> 1.0, >= 1.0.5) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) active_record_union (1.3.0) activerecord (>= 4.0) - activejob (4.2.10) - activesupport (= 4.2.10) - globalid (>= 0.3.0) - activemodel (4.2.10) - activesupport (= 4.2.10) - builder (~> 3.1) - activerecord (4.2.10) - activemodel (= 4.2.10) - activesupport (= 4.2.10) - arel (~> 6.0) - activesupport (4.2.10) - i18n (~> 0.7) + activejob (5.2.0) + activesupport (= 5.2.0) + globalid (>= 0.3.6) + activemodel (5.2.0) + activesupport (= 5.2.0) + activerecord (5.2.0) + activemodel (= 5.2.0) + activesupport (= 5.2.0) + arel (>= 9.0) + activestorage (5.2.0) + actionpack (= 5.2.0) + activerecord (= 5.2.0) + marcel (~> 0.3.1) + activesupport (5.2.0) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) addressable (2.5.2) public_suffix (>= 2.0.2, < 4.0) - arel (6.0.4) + arel (9.0.0) ast (2.4.0) authority (3.3.0) activesupport (>= 3.0.0) @@ -116,6 +123,7 @@ GEM crack (0.4.3) safe_yaml (~> 1.0.0) crass (1.0.4) + csv (1.0.0) cucumber (3.1.1) builder (>= 2.1.2) cucumber-core (~> 3.1.0) @@ -158,7 +166,6 @@ GEM diff-lcs (1.3) docile (1.1.5) erubi (1.7.1) - erubis (2.7.0) execjs (2.7.0) factory_bot (4.10.0) activesupport (>= 3.0.0) @@ -199,7 +206,7 @@ GEM htmlentities (4.3.4) httparty (0.16.2) multi_xml (>= 0.5.2) - i18n (0.9.5) + i18n (1.0.1) concurrent-ruby (~> 1.0) inline_svg (1.3.1) activesupport (>= 3.0) @@ -233,6 +240,8 @@ GEM lumberjack (1.0.13) mail (2.7.0) mini_mime (>= 0.1.1) + marcel (0.3.2) + mimemagic (~> 0.3.2) material_icons (2.2.1) railties (>= 3.2) medium-editor-rails (2.3.1) @@ -256,7 +265,8 @@ GEM mustache (1.0.5) nenv (0.3.0) newrelic_rpm (5.2.0.345) - nokogiri (1.8.3) + nio4r (2.3.1) + nokogiri (1.8.4) mini_portile2 (~> 2.3.0) nokogumbo (1.5.0) nokogiri @@ -293,27 +303,30 @@ GEM puma (~> 3.0) pundit (1.1.0) activesupport (>= 3.0.0) - rack (1.6.10) - rack-test (0.6.3) - rack (>= 1.0) + rack (2.0.5) + rack-test (1.0.0) + rack (>= 1.0, < 3) rack-timeout (0.5.1) - rails (4.2.10) - actionmailer (= 4.2.10) - actionpack (= 4.2.10) - actionview (= 4.2.10) - activejob (= 4.2.10) - activemodel (= 4.2.10) - activerecord (= 4.2.10) - activesupport (= 4.2.10) - bundler (>= 1.3.0, < 2.0) - railties (= 4.2.10) - sprockets-rails - rails-deprecated_sanitizer (1.0.3) - activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.9) - activesupport (>= 4.2.0, < 5.0) - nokogiri (~> 1.6) - rails-deprecated_sanitizer (>= 1.0.1) + rails (5.2.0) + actioncable (= 5.2.0) + actionmailer (= 5.2.0) + actionpack (= 5.2.0) + actionview (= 5.2.0) + activejob (= 5.2.0) + activemodel (= 5.2.0) + activerecord (= 5.2.0) + activestorage (= 5.2.0) + activesupport (= 5.2.0) + bundler (>= 1.3.0) + railties (= 5.2.0) + sprockets-rails (>= 2.0.0) + rails-controller-testing (1.0.2) + actionpack (~> 5.x, >= 5.0.1) + actionview (~> 5.x, >= 5.0.1) + activesupport (~> 5.x) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) rails-html-sanitizer (1.0.4) loofah (~> 2.2, >= 2.2.2) rails-jquery-autocomplete (1.0.3) @@ -326,9 +339,10 @@ GEM rails_stdout_logging rails_serve_static_assets (0.0.5) rails_stdout_logging (0.0.5) - railties (4.2.10) - actionpack (= 4.2.10) - activesupport (= 4.2.10) + railties (5.2.0) + actionpack (= 5.2.0) + activesupport (= 5.2.0) + method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rainbow (3.0.0) @@ -484,6 +498,9 @@ GEM addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff + websocket-driver (0.7.0) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.3) xpath (3.1.0) nokogiri (~> 1.8) @@ -503,6 +520,7 @@ DEPENDENCIES codeclimate-test-reporter coffee-rails coveralls + csv cucumber-rails database_cleaner dateslices @@ -526,7 +544,8 @@ DEPENDENCIES puma (~> 3.7) puma-heroku rack-timeout - rails (~> 4.2) + rails (~> 5.2) + rails-controller-testing rails-jquery-autocomplete rails-perftest rails-ujs @@ -559,4 +578,4 @@ RUBY VERSION ruby 2.5.1p57 BUNDLED WITH - 1.16.2 + 1.16.3 diff --git a/app/controllers/content_controller.rb b/app/controllers/content_controller.rb index dce21de2..8cb3591f 100644 --- a/app/controllers/content_controller.rb +++ b/app/controllers/content_controller.rb @@ -19,7 +19,7 @@ class ContentController < ApplicationController end end - @content = @content.flatten.uniq.sort_by(&:name) + @content = @content.to_a.flatten.uniq.sort_by(&:name) @questioned_content = @content.sample @question = @questioned_content.question unless @questioned_content.nil? diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index 9d61c3b6..9465625c 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -1,5 +1,5 @@ class RegistrationsController < Devise::RegistrationsController - after_filter :add_account, only: [:create] + after_action :add_account, only: [:create] def new super diff --git a/app/models/application_record.rb b/app/models/application_record.rb new file mode 100644 index 00000000..10a4cba8 --- /dev/null +++ b/app/models/application_record.rb @@ -0,0 +1,3 @@ +class ApplicationRecord < ActiveRecord::Base + self.abstract_class = true +end diff --git a/app/models/attribute.rb b/app/models/attribute.rb index c3272935..26259abd 100644 --- a/app/models/attribute.rb +++ b/app/models/attribute.rb @@ -1,4 +1,4 @@ -class Attribute < ActiveRecord::Base +class Attribute < ApplicationRecord belongs_to :user belongs_to :attribute_field belongs_to :entity, polymorphic: true diff --git a/app/models/attribute_category.rb b/app/models/attribute_category.rb index fa5e66f2..e66f05fd 100644 --- a/app/models/attribute_category.rb +++ b/app/models/attribute_category.rb @@ -1,4 +1,4 @@ -class AttributeCategory < ActiveRecord::Base +class AttributeCategory < ApplicationRecord validates :name, presence: true belongs_to :user diff --git a/app/models/attribute_field.rb b/app/models/attribute_field.rb index 880b91bf..484d9912 100644 --- a/app/models/attribute_field.rb +++ b/app/models/attribute_field.rb @@ -1,4 +1,4 @@ -class AttributeField < ActiveRecord::Base +class AttributeField < ApplicationRecord validates :name, presence: true belongs_to :user diff --git a/app/models/billing_plan.rb b/app/models/billing_plan.rb index 84d59b53..ce48e2ef 100644 --- a/app/models/billing_plan.rb +++ b/app/models/billing_plan.rb @@ -1,3 +1,3 @@ -class BillingPlan < ActiveRecord::Base +class BillingPlan < ApplicationRecord PREMIUM_IDS = [2, 3, 4, 5, 6] end diff --git a/app/models/content_change_event.rb b/app/models/content_change_event.rb index e98388ab..485f5932 100644 --- a/app/models/content_change_event.rb +++ b/app/models/content_change_event.rb @@ -1,4 +1,4 @@ -class ContentChangeEvent < ActiveRecord::Base +class ContentChangeEvent < ApplicationRecord belongs_to :user serialize :changed_fields, Hash diff --git a/app/models/content_groupers/archenemyship.rb b/app/models/content_groupers/archenemyship.rb index 4ffdde3c..299c4656 100644 --- a/app/models/content_groupers/archenemyship.rb +++ b/app/models/content_groupers/archenemyship.rb @@ -1,4 +1,4 @@ -class Archenemyship < ActiveRecord::Base +class Archenemyship < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/artifactship.rb b/app/models/content_groupers/artifactship.rb index c471c7ef..b9f8fbb3 100644 --- a/app/models/content_groupers/artifactship.rb +++ b/app/models/content_groupers/artifactship.rb @@ -1,8 +1,8 @@ -class Artifactship < ActiveRecord::Base +class Artifactship < ApplicationRecord include HasContentLinking belongs_to :user belongs_to :religion belongs_to :artifact, class_name: 'Item' -end \ No newline at end of file +end diff --git a/app/models/content_groupers/best_friendship.rb b/app/models/content_groupers/best_friendship.rb index 48bea44b..ac88b25d 100644 --- a/app/models/content_groupers/best_friendship.rb +++ b/app/models/content_groupers/best_friendship.rb @@ -1,4 +1,4 @@ -class BestFriendship < ActiveRecord::Base +class BestFriendship < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/birthing.rb b/app/models/content_groupers/birthing.rb index 3c5e41c0..1216e620 100644 --- a/app/models/content_groupers/birthing.rb +++ b/app/models/content_groupers/birthing.rb @@ -1,4 +1,4 @@ -class Birthing < ActiveRecord::Base +class Birthing < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/capital_cities_relationship.rb b/app/models/content_groupers/capital_cities_relationship.rb index ebba284b..f97ab0f8 100644 --- a/app/models/content_groupers/capital_cities_relationship.rb +++ b/app/models/content_groupers/capital_cities_relationship.rb @@ -1,6 +1,6 @@ # Defines a relation between a location and any capital cities within it, # and a reverse relation for all locations in which they are the capital of. -class CapitalCitiesRelationship < ActiveRecord::Base +class CapitalCitiesRelationship < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/character_birthtown.rb b/app/models/content_groupers/character_birthtown.rb index 2359f56b..ec0e6e52 100644 --- a/app/models/content_groupers/character_birthtown.rb +++ b/app/models/content_groupers/character_birthtown.rb @@ -1,4 +1,4 @@ -class CharacterBirthtown < ActiveRecord::Base +class CharacterBirthtown < ApplicationRecord belongs_to :user belongs_to :character belongs_to :birthtown, class_name: Town.name diff --git a/app/models/content_groupers/character_companion.rb b/app/models/content_groupers/character_companion.rb index 829dca6e..a06c7fa4 100644 --- a/app/models/content_groupers/character_companion.rb +++ b/app/models/content_groupers/character_companion.rb @@ -1,4 +1,4 @@ -class CharacterCompanion < ActiveRecord::Base +class CharacterCompanion < ApplicationRecord belongs_to :user belongs_to :character belongs_to :companion, class_name: Creature.name diff --git a/app/models/content_groupers/character_enemy.rb b/app/models/content_groupers/character_enemy.rb index 6327e7f2..ea215781 100644 --- a/app/models/content_groupers/character_enemy.rb +++ b/app/models/content_groupers/character_enemy.rb @@ -1,4 +1,4 @@ -class CharacterEnemy < ActiveRecord::Base +class CharacterEnemy < ApplicationRecord belongs_to :character belongs_to :user belongs_to :enemy, class_name: Character.name diff --git a/app/models/content_groupers/character_flora.rb b/app/models/content_groupers/character_flora.rb index c951f513..80108988 100644 --- a/app/models/content_groupers/character_flora.rb +++ b/app/models/content_groupers/character_flora.rb @@ -1,4 +1,4 @@ -class CharacterFlora < ActiveRecord::Base +class CharacterFlora < ApplicationRecord belongs_to :user belongs_to :character belongs_to :flora diff --git a/app/models/content_groupers/character_friend.rb b/app/models/content_groupers/character_friend.rb index 4e886fde..9ce88ec6 100644 --- a/app/models/content_groupers/character_friend.rb +++ b/app/models/content_groupers/character_friend.rb @@ -1,4 +1,4 @@ -class CharacterFriend < ActiveRecord::Base +class CharacterFriend < ApplicationRecord belongs_to :user belongs_to :character belongs_to :friend, class_name: Character.name diff --git a/app/models/content_groupers/character_item.rb b/app/models/content_groupers/character_item.rb index 14e682bd..fcdf5e43 100644 --- a/app/models/content_groupers/character_item.rb +++ b/app/models/content_groupers/character_item.rb @@ -1,4 +1,4 @@ -class CharacterItem < ActiveRecord::Base +class CharacterItem < ApplicationRecord belongs_to :user belongs_to :character belongs_to :item diff --git a/app/models/content_groupers/character_love_interest.rb b/app/models/content_groupers/character_love_interest.rb index 78de4a6c..cd504e54 100644 --- a/app/models/content_groupers/character_love_interest.rb +++ b/app/models/content_groupers/character_love_interest.rb @@ -1,4 +1,4 @@ -class CharacterLoveInterest < ActiveRecord::Base +class CharacterLoveInterest < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/character_magic.rb b/app/models/content_groupers/character_magic.rb index c0c22c27..1d97274e 100644 --- a/app/models/content_groupers/character_magic.rb +++ b/app/models/content_groupers/character_magic.rb @@ -1,4 +1,4 @@ -class CharacterMagic < ActiveRecord::Base +class CharacterMagic < ApplicationRecord belongs_to :character belongs_to :magic belongs_to :user diff --git a/app/models/content_groupers/character_technology.rb b/app/models/content_groupers/character_technology.rb index 19d6f56d..88650066 100644 --- a/app/models/content_groupers/character_technology.rb +++ b/app/models/content_groupers/character_technology.rb @@ -1,4 +1,4 @@ -class CharacterTechnology < ActiveRecord::Base +class CharacterTechnology < ApplicationRecord belongs_to :user belongs_to :character belongs_to :technology diff --git a/app/models/content_groupers/childrenship.rb b/app/models/content_groupers/childrenship.rb index 48bf7cd9..ee2fc386 100644 --- a/app/models/content_groupers/childrenship.rb +++ b/app/models/content_groupers/childrenship.rb @@ -1,4 +1,4 @@ -class Childrenship < ActiveRecord::Base +class Childrenship < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/country_creature.rb b/app/models/content_groupers/country_creature.rb index deaaae46..d55c82a4 100644 --- a/app/models/content_groupers/country_creature.rb +++ b/app/models/content_groupers/country_creature.rb @@ -1,4 +1,4 @@ -class CountryCreature < ActiveRecord::Base +class CountryCreature < ApplicationRecord belongs_to :user belongs_to :country belongs_to :creature diff --git a/app/models/content_groupers/country_flora.rb b/app/models/content_groupers/country_flora.rb index 06d1cf6c..e0788967 100644 --- a/app/models/content_groupers/country_flora.rb +++ b/app/models/content_groupers/country_flora.rb @@ -1,4 +1,4 @@ -class CountryFlora < ActiveRecord::Base +class CountryFlora < ApplicationRecord belongs_to :user belongs_to :country belongs_to :flora diff --git a/app/models/content_groupers/country_government.rb b/app/models/content_groupers/country_government.rb index 292080d9..f0688cde 100644 --- a/app/models/content_groupers/country_government.rb +++ b/app/models/content_groupers/country_government.rb @@ -1,4 +1,4 @@ -class CountryGovernment < ActiveRecord::Base +class CountryGovernment < ApplicationRecord belongs_to :country belongs_to :government belongs_to :user diff --git a/app/models/content_groupers/country_landmark.rb b/app/models/content_groupers/country_landmark.rb index d3090955..797ed611 100644 --- a/app/models/content_groupers/country_landmark.rb +++ b/app/models/content_groupers/country_landmark.rb @@ -1,4 +1,4 @@ -class CountryLandmark < ActiveRecord::Base +class CountryLandmark < ApplicationRecord belongs_to :user belongs_to :country belongs_to :landmark diff --git a/app/models/content_groupers/country_language.rb b/app/models/content_groupers/country_language.rb index 851eb606..7aef11a2 100644 --- a/app/models/content_groupers/country_language.rb +++ b/app/models/content_groupers/country_language.rb @@ -1,4 +1,4 @@ -class CountryLanguage < ActiveRecord::Base +class CountryLanguage < ApplicationRecord belongs_to :user belongs_to :country belongs_to :language diff --git a/app/models/content_groupers/country_location.rb b/app/models/content_groupers/country_location.rb index f5da1e00..45aac7cd 100644 --- a/app/models/content_groupers/country_location.rb +++ b/app/models/content_groupers/country_location.rb @@ -1,4 +1,4 @@ -class CountryLocation < ActiveRecord::Base +class CountryLocation < ApplicationRecord belongs_to :user belongs_to :country belongs_to :location diff --git a/app/models/content_groupers/country_religion.rb b/app/models/content_groupers/country_religion.rb index d772fabd..af985484 100644 --- a/app/models/content_groupers/country_religion.rb +++ b/app/models/content_groupers/country_religion.rb @@ -1,4 +1,4 @@ -class CountryReligion < ActiveRecord::Base +class CountryReligion < ApplicationRecord belongs_to :user belongs_to :country belongs_to :religion diff --git a/app/models/content_groupers/country_town.rb b/app/models/content_groupers/country_town.rb index a5ebd032..992a1ae9 100644 --- a/app/models/content_groupers/country_town.rb +++ b/app/models/content_groupers/country_town.rb @@ -1,4 +1,4 @@ -class CountryTown < ActiveRecord::Base +class CountryTown < ApplicationRecord belongs_to :user belongs_to :country belongs_to :town diff --git a/app/models/content_groupers/creature_relationship.rb b/app/models/content_groupers/creature_relationship.rb index f84188de..83ebcc2f 100644 --- a/app/models/content_groupers/creature_relationship.rb +++ b/app/models/content_groupers/creature_relationship.rb @@ -1,4 +1,4 @@ -class CreatureRelationship < ActiveRecord::Base +class CreatureRelationship < ApplicationRecord include HasContentLinking LINK_TYPE = :two_way diff --git a/app/models/content_groupers/current_ownership.rb b/app/models/content_groupers/current_ownership.rb index be1949c2..5c408db3 100644 --- a/app/models/content_groupers/current_ownership.rb +++ b/app/models/content_groupers/current_ownership.rb @@ -1,6 +1,6 @@ # Defines a relation from an Item to the Character that currently owns it # and an inverse relationship from a Character to all items it currently owns -class CurrentOwnership < ActiveRecord::Base +class CurrentOwnership < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/deity_ability.rb b/app/models/content_groupers/deity_ability.rb index d5724fce..2c21f249 100644 --- a/app/models/content_groupers/deity_ability.rb +++ b/app/models/content_groupers/deity_ability.rb @@ -1,4 +1,4 @@ -class DeityAbility < ActiveRecord::Base +class DeityAbility < ApplicationRecord belongs_to :user belongs_to :deity belongs_to :ability, class_name: Magic.name diff --git a/app/models/content_groupers/deity_character_child.rb b/app/models/content_groupers/deity_character_child.rb index 8df10efc..761822ad 100644 --- a/app/models/content_groupers/deity_character_child.rb +++ b/app/models/content_groupers/deity_character_child.rb @@ -1,4 +1,4 @@ -class DeityCharacterChild < ActiveRecord::Base +class DeityCharacterChild < ApplicationRecord belongs_to :user belongs_to :deity belongs_to :character_child, class_name: Character.name diff --git a/app/models/content_groupers/deity_character_parent.rb b/app/models/content_groupers/deity_character_parent.rb index ae662898..2f5fb053 100644 --- a/app/models/content_groupers/deity_character_parent.rb +++ b/app/models/content_groupers/deity_character_parent.rb @@ -1,4 +1,4 @@ -class DeityCharacterParent < ActiveRecord::Base +class DeityCharacterParent < ApplicationRecord belongs_to :user belongs_to :deity belongs_to :character_parent, class_name: Character.name diff --git a/app/models/content_groupers/deity_character_partner.rb b/app/models/content_groupers/deity_character_partner.rb index 47d47730..27542e5c 100644 --- a/app/models/content_groupers/deity_character_partner.rb +++ b/app/models/content_groupers/deity_character_partner.rb @@ -1,4 +1,4 @@ -class DeityCharacterPartner < ActiveRecord::Base +class DeityCharacterPartner < ApplicationRecord belongs_to :user belongs_to :deity belongs_to :character_partner, class_name: Character.name diff --git a/app/models/content_groupers/deity_character_sibling.rb b/app/models/content_groupers/deity_character_sibling.rb index ad4589df..e2a494a1 100644 --- a/app/models/content_groupers/deity_character_sibling.rb +++ b/app/models/content_groupers/deity_character_sibling.rb @@ -1,4 +1,4 @@ -class DeityCharacterSibling < ActiveRecord::Base +class DeityCharacterSibling < ApplicationRecord include HasContentLinking belongs_to :deity diff --git a/app/models/content_groupers/deity_creature.rb b/app/models/content_groupers/deity_creature.rb index 172c48d0..198931bd 100644 --- a/app/models/content_groupers/deity_creature.rb +++ b/app/models/content_groupers/deity_creature.rb @@ -1,4 +1,4 @@ -class DeityCreature < ActiveRecord::Base +class DeityCreature < ApplicationRecord belongs_to :user belongs_to :deity belongs_to :creature diff --git a/app/models/content_groupers/deity_deity_child.rb b/app/models/content_groupers/deity_deity_child.rb index 019ed836..a1fdb7f0 100644 --- a/app/models/content_groupers/deity_deity_child.rb +++ b/app/models/content_groupers/deity_deity_child.rb @@ -1,4 +1,4 @@ -class DeityDeityChild < ActiveRecord::Base +class DeityDeityChild < ApplicationRecord belongs_to :user belongs_to :deity belongs_to :deity_child, class_name: Deity.name diff --git a/app/models/content_groupers/deity_deity_parent.rb b/app/models/content_groupers/deity_deity_parent.rb index 22ea357f..a71a9769 100644 --- a/app/models/content_groupers/deity_deity_parent.rb +++ b/app/models/content_groupers/deity_deity_parent.rb @@ -1,4 +1,4 @@ -class DeityDeityParent < ActiveRecord::Base +class DeityDeityParent < ApplicationRecord belongs_to :user belongs_to :deity belongs_to :deity_parent, class_name: Deity.name diff --git a/app/models/content_groupers/deity_deity_partner.rb b/app/models/content_groupers/deity_deity_partner.rb index 7094886b..fa980ad1 100644 --- a/app/models/content_groupers/deity_deity_partner.rb +++ b/app/models/content_groupers/deity_deity_partner.rb @@ -1,4 +1,4 @@ -class DeityDeityPartner < ActiveRecord::Base +class DeityDeityPartner < ApplicationRecord belongs_to :user belongs_to :deity belongs_to :deity_partner, class_name: Deity.name diff --git a/app/models/content_groupers/deity_deity_sibling.rb b/app/models/content_groupers/deity_deity_sibling.rb index 3c32c85b..69cd6de5 100644 --- a/app/models/content_groupers/deity_deity_sibling.rb +++ b/app/models/content_groupers/deity_deity_sibling.rb @@ -1,4 +1,4 @@ -class DeityDeitySibling < ActiveRecord::Base +class DeityDeitySibling < ApplicationRecord include HasContentLinking belongs_to :deity diff --git a/app/models/content_groupers/deity_flora.rb b/app/models/content_groupers/deity_flora.rb index 73b8cc78..59428154 100644 --- a/app/models/content_groupers/deity_flora.rb +++ b/app/models/content_groupers/deity_flora.rb @@ -1,4 +1,4 @@ -class DeityFlora < ActiveRecord::Base +class DeityFlora < ApplicationRecord belongs_to :user belongs_to :deity belongs_to :flora diff --git a/app/models/content_groupers/deity_race.rb b/app/models/content_groupers/deity_race.rb index 3b937756..9bdfcf9a 100644 --- a/app/models/content_groupers/deity_race.rb +++ b/app/models/content_groupers/deity_race.rb @@ -1,4 +1,4 @@ -class DeityRace < ActiveRecord::Base +class DeityRace < ApplicationRecord belongs_to :deity belongs_to :race belongs_to :user diff --git a/app/models/content_groupers/deity_related_landmark.rb b/app/models/content_groupers/deity_related_landmark.rb index b7eef19a..58f323d2 100644 --- a/app/models/content_groupers/deity_related_landmark.rb +++ b/app/models/content_groupers/deity_related_landmark.rb @@ -1,4 +1,4 @@ -class DeityRelatedLandmark < ActiveRecord::Base +class DeityRelatedLandmark < ApplicationRecord belongs_to :user belongs_to :deity belongs_to :related_landmark, class_name: Landmark.name diff --git a/app/models/content_groupers/deity_related_town.rb b/app/models/content_groupers/deity_related_town.rb index a4486996..75f5d991 100644 --- a/app/models/content_groupers/deity_related_town.rb +++ b/app/models/content_groupers/deity_related_town.rb @@ -1,4 +1,4 @@ -class DeityRelatedTown < ActiveRecord::Base +class DeityRelatedTown < ApplicationRecord belongs_to :user belongs_to :deity belongs_to :related_town, class_name: Town.name diff --git a/app/models/content_groupers/deity_relic.rb b/app/models/content_groupers/deity_relic.rb index ff7ded48..43694ed2 100644 --- a/app/models/content_groupers/deity_relic.rb +++ b/app/models/content_groupers/deity_relic.rb @@ -1,4 +1,4 @@ -class DeityRelic < ActiveRecord::Base +class DeityRelic < ApplicationRecord belongs_to :user belongs_to :deity belongs_to :relic, class_name: Item.name diff --git a/app/models/content_groupers/deity_religion.rb b/app/models/content_groupers/deity_religion.rb index 55ea56bb..6a7fb0df 100644 --- a/app/models/content_groupers/deity_religion.rb +++ b/app/models/content_groupers/deity_religion.rb @@ -1,4 +1,4 @@ -class DeityReligion < ActiveRecord::Base +class DeityReligion < ApplicationRecord belongs_to :user belongs_to :deity belongs_to :religion diff --git a/app/models/content_groupers/deityship.rb b/app/models/content_groupers/deityship.rb index ca6f68cf..350cd515 100644 --- a/app/models/content_groupers/deityship.rb +++ b/app/models/content_groupers/deityship.rb @@ -1,4 +1,4 @@ -class Deityship < ActiveRecord::Base +class Deityship < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/famous_figureship.rb b/app/models/content_groupers/famous_figureship.rb index fc692a5c..04487218 100644 --- a/app/models/content_groupers/famous_figureship.rb +++ b/app/models/content_groupers/famous_figureship.rb @@ -1,4 +1,4 @@ -class FamousFigureship < ActiveRecord::Base +class FamousFigureship < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/fathership.rb b/app/models/content_groupers/fathership.rb index bc132987..6b07fffe 100644 --- a/app/models/content_groupers/fathership.rb +++ b/app/models/content_groupers/fathership.rb @@ -1,4 +1,4 @@ -class Fathership < ActiveRecord::Base +class Fathership < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/flora_eaten_by.rb b/app/models/content_groupers/flora_eaten_by.rb index 793b4ed8..2d8a3847 100644 --- a/app/models/content_groupers/flora_eaten_by.rb +++ b/app/models/content_groupers/flora_eaten_by.rb @@ -1,4 +1,4 @@ -class FloraEatenBy < ActiveRecord::Base +class FloraEatenBy < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/flora_location.rb b/app/models/content_groupers/flora_location.rb index 38e581fb..2200f749 100644 --- a/app/models/content_groupers/flora_location.rb +++ b/app/models/content_groupers/flora_location.rb @@ -1,4 +1,4 @@ -class FloraLocation < ActiveRecord::Base +class FloraLocation < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/flora_magical_effect.rb b/app/models/content_groupers/flora_magical_effect.rb index e9e8dbf1..5c218716 100644 --- a/app/models/content_groupers/flora_magical_effect.rb +++ b/app/models/content_groupers/flora_magical_effect.rb @@ -1,4 +1,4 @@ -class FloraMagicalEffect < ActiveRecord::Base +class FloraMagicalEffect < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/flora_relationship.rb b/app/models/content_groupers/flora_relationship.rb index e1ef33f7..bcbc1151 100644 --- a/app/models/content_groupers/flora_relationship.rb +++ b/app/models/content_groupers/flora_relationship.rb @@ -1,4 +1,4 @@ -class FloraRelationship < ActiveRecord::Base +class FloraRelationship < ApplicationRecord include HasContentLinking LINK_TYPE = :two_way diff --git a/app/models/content_groupers/government_creature.rb b/app/models/content_groupers/government_creature.rb index ecf5a000..131a7261 100644 --- a/app/models/content_groupers/government_creature.rb +++ b/app/models/content_groupers/government_creature.rb @@ -1,4 +1,4 @@ -class GovernmentCreature < ActiveRecord::Base +class GovernmentCreature < ApplicationRecord belongs_to :user belongs_to :government belongs_to :creature diff --git a/app/models/content_groupers/government_group.rb b/app/models/content_groupers/government_group.rb index 5d7644e4..d235b8c3 100644 --- a/app/models/content_groupers/government_group.rb +++ b/app/models/content_groupers/government_group.rb @@ -1,4 +1,4 @@ -class GovernmentGroup < ActiveRecord::Base +class GovernmentGroup < ApplicationRecord belongs_to :user belongs_to :government belongs_to :group diff --git a/app/models/content_groupers/government_item.rb b/app/models/content_groupers/government_item.rb index 4b679556..d935322a 100644 --- a/app/models/content_groupers/government_item.rb +++ b/app/models/content_groupers/government_item.rb @@ -1,4 +1,4 @@ -class GovernmentItem < ActiveRecord::Base +class GovernmentItem < ApplicationRecord belongs_to :user belongs_to :government belongs_to :item diff --git a/app/models/content_groupers/government_leader.rb b/app/models/content_groupers/government_leader.rb index 1bffb351..f69511ec 100644 --- a/app/models/content_groupers/government_leader.rb +++ b/app/models/content_groupers/government_leader.rb @@ -1,4 +1,4 @@ -class GovernmentLeader < ActiveRecord::Base +class GovernmentLeader < ApplicationRecord belongs_to :user belongs_to :government belongs_to :leader, class_name: Character.name diff --git a/app/models/content_groupers/government_political_figure.rb b/app/models/content_groupers/government_political_figure.rb index 2c58d0ef..aa5fa10d 100644 --- a/app/models/content_groupers/government_political_figure.rb +++ b/app/models/content_groupers/government_political_figure.rb @@ -1,4 +1,4 @@ -class GovernmentPoliticalFigure < ActiveRecord::Base +class GovernmentPoliticalFigure < ApplicationRecord belongs_to :user belongs_to :government belongs_to :political_figure, class_name: Character.name diff --git a/app/models/content_groupers/government_technology.rb b/app/models/content_groupers/government_technology.rb index 86e72782..08657168 100644 --- a/app/models/content_groupers/government_technology.rb +++ b/app/models/content_groupers/government_technology.rb @@ -1,4 +1,4 @@ -class GovernmentTechnology < ActiveRecord::Base +class GovernmentTechnology < ApplicationRecord belongs_to :user belongs_to :government belongs_to :technology diff --git a/app/models/content_groupers/group_allyship.rb b/app/models/content_groupers/group_allyship.rb index 9f516ad5..e6dc9d68 100644 --- a/app/models/content_groupers/group_allyship.rb +++ b/app/models/content_groupers/group_allyship.rb @@ -1,4 +1,4 @@ -class GroupAllyship < ActiveRecord::Base +class GroupAllyship < ApplicationRecord include HasContentLinking belongs_to :user @@ -17,4 +17,4 @@ class GroupAllyship < ActiveRecord::Base other_object.allies.delete this_object end -end \ No newline at end of file +end diff --git a/app/models/content_groupers/group_clientship.rb b/app/models/content_groupers/group_clientship.rb index 10e54909..ec5e1170 100644 --- a/app/models/content_groupers/group_clientship.rb +++ b/app/models/content_groupers/group_clientship.rb @@ -1,8 +1,8 @@ -class GroupClientship < ActiveRecord::Base +class GroupClientship < ApplicationRecord include HasContentLinking belongs_to :user belongs_to :group belongs_to :client, class_name: 'Group' -end \ No newline at end of file +end diff --git a/app/models/content_groupers/group_creature.rb b/app/models/content_groupers/group_creature.rb index 2e5d306b..7a1e017e 100644 --- a/app/models/content_groupers/group_creature.rb +++ b/app/models/content_groupers/group_creature.rb @@ -1,4 +1,4 @@ -class GroupCreature < ActiveRecord::Base +class GroupCreature < ApplicationRecord belongs_to :group belongs_to :creature belongs_to :user diff --git a/app/models/content_groupers/group_enemyship.rb b/app/models/content_groupers/group_enemyship.rb index c9fb720a..e36369f1 100644 --- a/app/models/content_groupers/group_enemyship.rb +++ b/app/models/content_groupers/group_enemyship.rb @@ -1,4 +1,4 @@ -class GroupEnemyship < ActiveRecord::Base +class GroupEnemyship < ApplicationRecord include HasContentLinking belongs_to :user @@ -17,4 +17,4 @@ class GroupEnemyship < ActiveRecord::Base other_object.enemies.delete this_object end -end \ No newline at end of file +end diff --git a/app/models/content_groupers/group_equipmentship.rb b/app/models/content_groupers/group_equipmentship.rb index d3a12eff..59dcd77a 100644 --- a/app/models/content_groupers/group_equipmentship.rb +++ b/app/models/content_groupers/group_equipmentship.rb @@ -1,8 +1,8 @@ -class GroupEquipmentship < ActiveRecord::Base +class GroupEquipmentship < ApplicationRecord include HasContentLinking belongs_to :user belongs_to :group belongs_to :equipment, class_name: 'Item' -end \ No newline at end of file +end diff --git a/app/models/content_groupers/group_leadership.rb b/app/models/content_groupers/group_leadership.rb index 44614f1e..000b0309 100644 --- a/app/models/content_groupers/group_leadership.rb +++ b/app/models/content_groupers/group_leadership.rb @@ -1,8 +1,8 @@ -class GroupLeadership < ActiveRecord::Base +class GroupLeadership < ApplicationRecord include HasContentLinking belongs_to :user belongs_to :group belongs_to :leader, class_name: 'Character' -end \ No newline at end of file +end diff --git a/app/models/content_groupers/group_locationship.rb b/app/models/content_groupers/group_locationship.rb index 83dc1d29..d5badcd9 100644 --- a/app/models/content_groupers/group_locationship.rb +++ b/app/models/content_groupers/group_locationship.rb @@ -1,8 +1,8 @@ -class GroupLocationship < ActiveRecord::Base +class GroupLocationship < ApplicationRecord include HasContentLinking belongs_to :user belongs_to :group belongs_to :location -end \ No newline at end of file +end diff --git a/app/models/content_groupers/group_membership.rb b/app/models/content_groupers/group_membership.rb index d23d4484..e932f467 100644 --- a/app/models/content_groupers/group_membership.rb +++ b/app/models/content_groupers/group_membership.rb @@ -1,8 +1,8 @@ -class GroupMembership < ActiveRecord::Base +class GroupMembership < ApplicationRecord include HasContentLinking belongs_to :user belongs_to :group belongs_to :member, class_name: 'Character' -end \ No newline at end of file +end diff --git a/app/models/content_groupers/group_rivalship.rb b/app/models/content_groupers/group_rivalship.rb index 2bea93ba..f8b7f9dd 100644 --- a/app/models/content_groupers/group_rivalship.rb +++ b/app/models/content_groupers/group_rivalship.rb @@ -1,4 +1,4 @@ -class GroupRivalship < ActiveRecord::Base +class GroupRivalship < ApplicationRecord include HasContentLinking belongs_to :user @@ -17,4 +17,4 @@ class GroupRivalship < ActiveRecord::Base other_object.rivals.delete this_object end -end \ No newline at end of file +end diff --git a/app/models/content_groupers/group_suppliership.rb b/app/models/content_groupers/group_suppliership.rb index 3ddcbd94..e71e77b7 100644 --- a/app/models/content_groupers/group_suppliership.rb +++ b/app/models/content_groupers/group_suppliership.rb @@ -1,8 +1,8 @@ -class GroupSuppliership < ActiveRecord::Base +class GroupSuppliership < ApplicationRecord include HasContentLinking belongs_to :user belongs_to :group belongs_to :supplier, class_name: 'Group' -end \ No newline at end of file +end diff --git a/app/models/content_groupers/headquartership.rb b/app/models/content_groupers/headquartership.rb index 0912ed01..e168c5e2 100644 --- a/app/models/content_groupers/headquartership.rb +++ b/app/models/content_groupers/headquartership.rb @@ -1,8 +1,8 @@ -class Headquartership < ActiveRecord::Base +class Headquartership < ApplicationRecord include HasContentLinking belongs_to :user belongs_to :group belongs_to :headquarter, class_name: 'Location' -end \ No newline at end of file +end diff --git a/app/models/content_groupers/item_magic.rb b/app/models/content_groupers/item_magic.rb index aee842d1..e7fefc4f 100644 --- a/app/models/content_groupers/item_magic.rb +++ b/app/models/content_groupers/item_magic.rb @@ -1,4 +1,4 @@ -class ItemMagic < ActiveRecord::Base +class ItemMagic < ApplicationRecord belongs_to :item belongs_to :magic belongs_to :user diff --git a/app/models/content_groupers/key_itemship.rb b/app/models/content_groupers/key_itemship.rb index 05d68817..7175922f 100644 --- a/app/models/content_groupers/key_itemship.rb +++ b/app/models/content_groupers/key_itemship.rb @@ -1,8 +1,8 @@ -class KeyItemship < ActiveRecord::Base +class KeyItemship < ApplicationRecord include HasContentLinking belongs_to :user belongs_to :group belongs_to :key_item, class_name: 'Item' -end \ No newline at end of file +end diff --git a/app/models/content_groupers/landmark_country.rb b/app/models/content_groupers/landmark_country.rb index 0752495f..9af5b3c8 100644 --- a/app/models/content_groupers/landmark_country.rb +++ b/app/models/content_groupers/landmark_country.rb @@ -1,4 +1,4 @@ -class LandmarkCountry < ActiveRecord::Base +class LandmarkCountry < ApplicationRecord belongs_to :user belongs_to :landmark belongs_to :country diff --git a/app/models/content_groupers/landmark_creature.rb b/app/models/content_groupers/landmark_creature.rb index 075d0065..faf65b80 100644 --- a/app/models/content_groupers/landmark_creature.rb +++ b/app/models/content_groupers/landmark_creature.rb @@ -1,4 +1,4 @@ -class LandmarkCreature < ActiveRecord::Base +class LandmarkCreature < ApplicationRecord belongs_to :user belongs_to :landmark belongs_to :creature diff --git a/app/models/content_groupers/landmark_flora.rb b/app/models/content_groupers/landmark_flora.rb index 23f44e01..6da9558e 100644 --- a/app/models/content_groupers/landmark_flora.rb +++ b/app/models/content_groupers/landmark_flora.rb @@ -1,4 +1,4 @@ -class LandmarkFlora < ActiveRecord::Base +class LandmarkFlora < ApplicationRecord belongs_to :user belongs_to :landmark belongs_to :flora diff --git a/app/models/content_groupers/landmark_nearby_town.rb b/app/models/content_groupers/landmark_nearby_town.rb index e40e3610..cb23903b 100644 --- a/app/models/content_groupers/landmark_nearby_town.rb +++ b/app/models/content_groupers/landmark_nearby_town.rb @@ -1,4 +1,4 @@ -class LandmarkNearbyTown < ActiveRecord::Base +class LandmarkNearbyTown < ApplicationRecord belongs_to :user belongs_to :landmark diff --git a/app/models/content_groupers/largest_cities_relationship.rb b/app/models/content_groupers/largest_cities_relationship.rb index a8c1ca22..c68e3e5e 100644 --- a/app/models/content_groupers/largest_cities_relationship.rb +++ b/app/models/content_groupers/largest_cities_relationship.rb @@ -1,4 +1,4 @@ -class LargestCitiesRelationship < ActiveRecord::Base +class LargestCitiesRelationship < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/lingualism.rb b/app/models/content_groupers/lingualism.rb index 82fb5fd5..6ecbdc63 100644 --- a/app/models/content_groupers/lingualism.rb +++ b/app/models/content_groupers/lingualism.rb @@ -1,8 +1,8 @@ -class Lingualism < ActiveRecord::Base +class Lingualism < ApplicationRecord include HasContentLinking belongs_to :user belongs_to :character belongs_to :spoken_language, class_name: 'Language' -end \ No newline at end of file +end diff --git a/app/models/content_groupers/location_capital_town.rb b/app/models/content_groupers/location_capital_town.rb index e0393c98..45faae97 100644 --- a/app/models/content_groupers/location_capital_town.rb +++ b/app/models/content_groupers/location_capital_town.rb @@ -1,4 +1,4 @@ -class LocationCapitalTown < ActiveRecord::Base +class LocationCapitalTown < ApplicationRecord belongs_to :location belongs_to :user belongs_to :capital_town, class_name: Town.name diff --git a/app/models/content_groupers/location_landmark.rb b/app/models/content_groupers/location_landmark.rb index d62b103b..37080508 100644 --- a/app/models/content_groupers/location_landmark.rb +++ b/app/models/content_groupers/location_landmark.rb @@ -1,4 +1,4 @@ -class LocationLandmark < ActiveRecord::Base +class LocationLandmark < ApplicationRecord belongs_to :location belongs_to :landmark belongs_to :user diff --git a/app/models/content_groupers/location_languageship.rb b/app/models/content_groupers/location_languageship.rb index b47a480e..65750c7d 100644 --- a/app/models/content_groupers/location_languageship.rb +++ b/app/models/content_groupers/location_languageship.rb @@ -1,4 +1,4 @@ -class LocationLanguageship < ActiveRecord::Base +class LocationLanguageship < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/location_largest_town.rb b/app/models/content_groupers/location_largest_town.rb index ac2d6b5a..ee48d27d 100644 --- a/app/models/content_groupers/location_largest_town.rb +++ b/app/models/content_groupers/location_largest_town.rb @@ -1,4 +1,4 @@ -class LocationLargestTown < ActiveRecord::Base +class LocationLargestTown < ApplicationRecord belongs_to :location belongs_to :user belongs_to :largest_town, class_name: Town.name diff --git a/app/models/content_groupers/location_leadership.rb b/app/models/content_groupers/location_leadership.rb index 7f1c6b41..3da71aa2 100644 --- a/app/models/content_groupers/location_leadership.rb +++ b/app/models/content_groupers/location_leadership.rb @@ -1,4 +1,4 @@ -class LocationLeadership < ActiveRecord::Base +class LocationLeadership < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/location_notable_town.rb b/app/models/content_groupers/location_notable_town.rb index ee920dcc..cecf0815 100644 --- a/app/models/content_groupers/location_notable_town.rb +++ b/app/models/content_groupers/location_notable_town.rb @@ -1,4 +1,4 @@ -class LocationNotableTown < ActiveRecord::Base +class LocationNotableTown < ApplicationRecord belongs_to :location belongs_to :user belongs_to :notable_town, class_name: Town.name diff --git a/app/models/content_groupers/magic_deityship.rb b/app/models/content_groupers/magic_deityship.rb index 5eae9f0e..e6ef62d9 100644 --- a/app/models/content_groupers/magic_deityship.rb +++ b/app/models/content_groupers/magic_deityship.rb @@ -1,8 +1,8 @@ -class MagicDeityship < ActiveRecord::Base +class MagicDeityship < ApplicationRecord include HasContentLinking belongs_to :user belongs_to :magic belongs_to :deity, class_name: 'Character' -end \ No newline at end of file +end diff --git a/app/models/content_groupers/maker_relationship.rb b/app/models/content_groupers/maker_relationship.rb index e3a10f09..582bf8d1 100644 --- a/app/models/content_groupers/maker_relationship.rb +++ b/app/models/content_groupers/maker_relationship.rb @@ -1,6 +1,6 @@ # Defines a relation from an Item to the Character that created it # and an inverse relationship from a Character to all items it created -class MakerRelationship < ActiveRecord::Base +class MakerRelationship < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/marriage.rb b/app/models/content_groupers/marriage.rb index 402840e7..fecdbaa6 100644 --- a/app/models/content_groupers/marriage.rb +++ b/app/models/content_groupers/marriage.rb @@ -1,4 +1,4 @@ -class Marriage < ActiveRecord::Base +class Marriage < ApplicationRecord include HasContentLinking LINK_TYPE = :two_way diff --git a/app/models/content_groupers/mothership.rb b/app/models/content_groupers/mothership.rb index 1dbb8da9..74fec4e9 100644 --- a/app/models/content_groupers/mothership.rb +++ b/app/models/content_groupers/mothership.rb @@ -1,4 +1,4 @@ -class Mothership < ActiveRecord::Base +class Mothership < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/notable_cities_relationship.rb b/app/models/content_groupers/notable_cities_relationship.rb index 8b236e00..c3f16c06 100644 --- a/app/models/content_groupers/notable_cities_relationship.rb +++ b/app/models/content_groupers/notable_cities_relationship.rb @@ -1,6 +1,6 @@ # Defines a relation between a location and any notable cities within it, # and a reverse relation for all locations in which a given location is notable within. -class NotableCitiesRelationship < ActiveRecord::Base +class NotableCitiesRelationship < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/officeship.rb b/app/models/content_groupers/officeship.rb index 2bb04660..6395948b 100644 --- a/app/models/content_groupers/officeship.rb +++ b/app/models/content_groupers/officeship.rb @@ -1,8 +1,8 @@ -class Officeship < ActiveRecord::Base +class Officeship < ApplicationRecord include HasContentLinking belongs_to :user belongs_to :group belongs_to :office, class_name: 'Location' -end \ No newline at end of file +end diff --git a/app/models/content_groupers/original_ownership.rb b/app/models/content_groupers/original_ownership.rb index cf5f52d0..46a82fa1 100644 --- a/app/models/content_groupers/original_ownership.rb +++ b/app/models/content_groupers/original_ownership.rb @@ -1,6 +1,6 @@ # Defines a relation from an Item to the Character that first owned it # and an inverse relationship from a Character to all items it first owned -class OriginalOwnership < ActiveRecord::Base +class OriginalOwnership < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/past_ownership.rb b/app/models/content_groupers/past_ownership.rb index 58c0775b..b7c3dba8 100644 --- a/app/models/content_groupers/past_ownership.rb +++ b/app/models/content_groupers/past_ownership.rb @@ -1,6 +1,6 @@ # Defines a relation from an Item to a Character that previously owned it # and an inverse relationship from an Item to all Characters it has been owned by -class PastOwnership < ActiveRecord::Base +class PastOwnership < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/planet_country.rb b/app/models/content_groupers/planet_country.rb index 2b1688ab..b3ea5fac 100644 --- a/app/models/content_groupers/planet_country.rb +++ b/app/models/content_groupers/planet_country.rb @@ -1,4 +1,4 @@ -class PlanetCountry < ActiveRecord::Base +class PlanetCountry < ApplicationRecord belongs_to :user belongs_to :planet belongs_to :country diff --git a/app/models/content_groupers/planet_creature.rb b/app/models/content_groupers/planet_creature.rb index 12632e46..16e8c9fa 100644 --- a/app/models/content_groupers/planet_creature.rb +++ b/app/models/content_groupers/planet_creature.rb @@ -1,4 +1,4 @@ -class PlanetCreature < ActiveRecord::Base +class PlanetCreature < ApplicationRecord belongs_to :user belongs_to :planet belongs_to :creature diff --git a/app/models/content_groupers/planet_deity.rb b/app/models/content_groupers/planet_deity.rb index c3e1d61e..8e92b3dd 100644 --- a/app/models/content_groupers/planet_deity.rb +++ b/app/models/content_groupers/planet_deity.rb @@ -1,4 +1,4 @@ -class PlanetDeity < ActiveRecord::Base +class PlanetDeity < ApplicationRecord belongs_to :user belongs_to :planet belongs_to :deity diff --git a/app/models/content_groupers/planet_flora.rb b/app/models/content_groupers/planet_flora.rb index e8aba8ba..dd29d1e1 100644 --- a/app/models/content_groupers/planet_flora.rb +++ b/app/models/content_groupers/planet_flora.rb @@ -1,4 +1,4 @@ -class PlanetFlora < ActiveRecord::Base +class PlanetFlora < ApplicationRecord belongs_to :user belongs_to :planet belongs_to :flora diff --git a/app/models/content_groupers/planet_group.rb b/app/models/content_groupers/planet_group.rb index 79d474b3..83eed0d9 100644 --- a/app/models/content_groupers/planet_group.rb +++ b/app/models/content_groupers/planet_group.rb @@ -1,4 +1,4 @@ -class PlanetGroup < ActiveRecord::Base +class PlanetGroup < ApplicationRecord belongs_to :user belongs_to :planet belongs_to :group diff --git a/app/models/content_groupers/planet_landmark.rb b/app/models/content_groupers/planet_landmark.rb index df064ac0..9f19d313 100644 --- a/app/models/content_groupers/planet_landmark.rb +++ b/app/models/content_groupers/planet_landmark.rb @@ -1,4 +1,4 @@ -class PlanetLandmark < ActiveRecord::Base +class PlanetLandmark < ApplicationRecord belongs_to :user belongs_to :planet belongs_to :landmark diff --git a/app/models/content_groupers/planet_language.rb b/app/models/content_groupers/planet_language.rb index 9eb3e76a..77ae5d77 100644 --- a/app/models/content_groupers/planet_language.rb +++ b/app/models/content_groupers/planet_language.rb @@ -1,4 +1,4 @@ -class PlanetLanguage < ActiveRecord::Base +class PlanetLanguage < ApplicationRecord belongs_to :user belongs_to :planet belongs_to :language diff --git a/app/models/content_groupers/planet_location.rb b/app/models/content_groupers/planet_location.rb index bbf176ec..4f5df3ac 100644 --- a/app/models/content_groupers/planet_location.rb +++ b/app/models/content_groupers/planet_location.rb @@ -1,4 +1,4 @@ -class PlanetLocation < ActiveRecord::Base +class PlanetLocation < ApplicationRecord belongs_to :user belongs_to :planet belongs_to :location diff --git a/app/models/content_groupers/planet_nearby_planet.rb b/app/models/content_groupers/planet_nearby_planet.rb index 748fdc8a..1e87c36e 100644 --- a/app/models/content_groupers/planet_nearby_planet.rb +++ b/app/models/content_groupers/planet_nearby_planet.rb @@ -1,4 +1,4 @@ -class PlanetNearbyPlanet < ActiveRecord::Base +class PlanetNearbyPlanet < ApplicationRecord include HasContentLinking LINK_TYPE = :two_way diff --git a/app/models/content_groupers/planet_race.rb b/app/models/content_groupers/planet_race.rb index bb82115a..540121a5 100644 --- a/app/models/content_groupers/planet_race.rb +++ b/app/models/content_groupers/planet_race.rb @@ -1,4 +1,4 @@ -class PlanetRace < ActiveRecord::Base +class PlanetRace < ApplicationRecord belongs_to :user belongs_to :planet belongs_to :race diff --git a/app/models/content_groupers/planet_religion.rb b/app/models/content_groupers/planet_religion.rb index 0b2f9cd1..b9016fbf 100644 --- a/app/models/content_groupers/planet_religion.rb +++ b/app/models/content_groupers/planet_religion.rb @@ -1,4 +1,4 @@ -class PlanetReligion < ActiveRecord::Base +class PlanetReligion < ApplicationRecord belongs_to :user belongs_to :planet belongs_to :religion diff --git a/app/models/content_groupers/planet_town.rb b/app/models/content_groupers/planet_town.rb index dc875701..a8660036 100644 --- a/app/models/content_groupers/planet_town.rb +++ b/app/models/content_groupers/planet_town.rb @@ -1,4 +1,4 @@ -class PlanetTown < ActiveRecord::Base +class PlanetTown < ApplicationRecord belongs_to :user belongs_to :planet belongs_to :town diff --git a/app/models/content_groupers/raceship.rb b/app/models/content_groupers/raceship.rb index a868ef9d..1451c744 100644 --- a/app/models/content_groupers/raceship.rb +++ b/app/models/content_groupers/raceship.rb @@ -1,4 +1,4 @@ -class Raceship < ActiveRecord::Base +class Raceship < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/religious_figureship.rb b/app/models/content_groupers/religious_figureship.rb index 537ff586..73443a1f 100644 --- a/app/models/content_groupers/religious_figureship.rb +++ b/app/models/content_groupers/religious_figureship.rb @@ -1,4 +1,4 @@ -class ReligiousFigureship < ActiveRecord::Base +class ReligiousFigureship < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/religious_locationship.rb b/app/models/content_groupers/religious_locationship.rb index 4c36e2b5..8122b00a 100644 --- a/app/models/content_groupers/religious_locationship.rb +++ b/app/models/content_groupers/religious_locationship.rb @@ -1,4 +1,4 @@ -class ReligiousLocationship < ActiveRecord::Base +class ReligiousLocationship < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/religious_raceship.rb b/app/models/content_groupers/religious_raceship.rb index 1e15f830..d96d7476 100644 --- a/app/models/content_groupers/religious_raceship.rb +++ b/app/models/content_groupers/religious_raceship.rb @@ -1,8 +1,8 @@ -class ReligiousRaceship < ActiveRecord::Base +class ReligiousRaceship < ApplicationRecord include HasContentLinking belongs_to :user belongs_to :religion belongs_to :race -end \ No newline at end of file +end diff --git a/app/models/content_groupers/scene_charactership.rb b/app/models/content_groupers/scene_charactership.rb index 9faa7183..f3cdfa33 100644 --- a/app/models/content_groupers/scene_charactership.rb +++ b/app/models/content_groupers/scene_charactership.rb @@ -1,8 +1,8 @@ -class SceneCharactership < ActiveRecord::Base +class SceneCharactership < ApplicationRecord include HasContentLinking belongs_to :user belongs_to :scene belongs_to :scene_character, class_name: 'Character' -end \ No newline at end of file +end diff --git a/app/models/content_groupers/scene_itemship.rb b/app/models/content_groupers/scene_itemship.rb index 70496cc7..2d0ec314 100644 --- a/app/models/content_groupers/scene_itemship.rb +++ b/app/models/content_groupers/scene_itemship.rb @@ -1,8 +1,8 @@ -class SceneItemship < ActiveRecord::Base +class SceneItemship < ApplicationRecord include HasContentLinking belongs_to :user belongs_to :scene belongs_to :scene_item, class_name: 'Item' -end \ No newline at end of file +end diff --git a/app/models/content_groupers/scene_locationship.rb b/app/models/content_groupers/scene_locationship.rb index eb12ca56..4a61abb7 100644 --- a/app/models/content_groupers/scene_locationship.rb +++ b/app/models/content_groupers/scene_locationship.rb @@ -1,8 +1,8 @@ -class SceneLocationship < ActiveRecord::Base +class SceneLocationship < ApplicationRecord include HasContentLinking belongs_to :user belongs_to :scene belongs_to :scene_location, class_name: 'Location' -end \ No newline at end of file +end diff --git a/app/models/content_groupers/siblingship.rb b/app/models/content_groupers/siblingship.rb index 3133b944..1d888270 100644 --- a/app/models/content_groupers/siblingship.rb +++ b/app/models/content_groupers/siblingship.rb @@ -1,4 +1,4 @@ -class Siblingship < ActiveRecord::Base +class Siblingship < ApplicationRecord include HasContentLinking LINK_TYPE = :two_way diff --git a/app/models/content_groupers/sistergroupship.rb b/app/models/content_groupers/sistergroupship.rb index a5f1b22d..629a62f8 100644 --- a/app/models/content_groupers/sistergroupship.rb +++ b/app/models/content_groupers/sistergroupship.rb @@ -1,4 +1,4 @@ -class Sistergroupship < ActiveRecord::Base +class Sistergroupship < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/subgroupship.rb b/app/models/content_groupers/subgroupship.rb index bf47ed6a..66526b77 100644 --- a/app/models/content_groupers/subgroupship.rb +++ b/app/models/content_groupers/subgroupship.rb @@ -1,4 +1,4 @@ -class Subgroupship < ActiveRecord::Base +class Subgroupship < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/supergroupship.rb b/app/models/content_groupers/supergroupship.rb index 71c3a5e3..cfe0a1e9 100644 --- a/app/models/content_groupers/supergroupship.rb +++ b/app/models/content_groupers/supergroupship.rb @@ -1,4 +1,4 @@ -class Supergroupship < ActiveRecord::Base +class Supergroupship < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/technology_character.rb b/app/models/content_groupers/technology_character.rb index 6b6c36de..46b2fdac 100644 --- a/app/models/content_groupers/technology_character.rb +++ b/app/models/content_groupers/technology_character.rb @@ -1,4 +1,4 @@ -class TechnologyCharacter < ActiveRecord::Base +class TechnologyCharacter < ApplicationRecord belongs_to :user belongs_to :technology belongs_to :character diff --git a/app/models/content_groupers/technology_child_technology.rb b/app/models/content_groupers/technology_child_technology.rb index 58987f81..2751d75e 100644 --- a/app/models/content_groupers/technology_child_technology.rb +++ b/app/models/content_groupers/technology_child_technology.rb @@ -1,4 +1,4 @@ -class TechnologyChildTechnology < ActiveRecord::Base +class TechnologyChildTechnology < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/technology_country.rb b/app/models/content_groupers/technology_country.rb index 0d269f39..768a0cd8 100644 --- a/app/models/content_groupers/technology_country.rb +++ b/app/models/content_groupers/technology_country.rb @@ -1,4 +1,4 @@ -class TechnologyCountry < ActiveRecord::Base +class TechnologyCountry < ApplicationRecord belongs_to :user belongs_to :technology belongs_to :country diff --git a/app/models/content_groupers/technology_creature.rb b/app/models/content_groupers/technology_creature.rb index 6956ff94..294461b3 100644 --- a/app/models/content_groupers/technology_creature.rb +++ b/app/models/content_groupers/technology_creature.rb @@ -1,4 +1,4 @@ -class TechnologyCreature < ActiveRecord::Base +class TechnologyCreature < ApplicationRecord belongs_to :user belongs_to :technology belongs_to :creature diff --git a/app/models/content_groupers/technology_group.rb b/app/models/content_groupers/technology_group.rb index e0e247ad..b241e672 100644 --- a/app/models/content_groupers/technology_group.rb +++ b/app/models/content_groupers/technology_group.rb @@ -1,4 +1,4 @@ -class TechnologyGroup < ActiveRecord::Base +class TechnologyGroup < ApplicationRecord belongs_to :user belongs_to :technology belongs_to :group diff --git a/app/models/content_groupers/technology_magic.rb b/app/models/content_groupers/technology_magic.rb index aa0de9c5..3766c757 100644 --- a/app/models/content_groupers/technology_magic.rb +++ b/app/models/content_groupers/technology_magic.rb @@ -1,4 +1,4 @@ -class TechnologyMagic < ActiveRecord::Base +class TechnologyMagic < ApplicationRecord belongs_to :user belongs_to :technology belongs_to :magic diff --git a/app/models/content_groupers/technology_parent_technology.rb b/app/models/content_groupers/technology_parent_technology.rb index 39454c0a..eb168c27 100644 --- a/app/models/content_groupers/technology_parent_technology.rb +++ b/app/models/content_groupers/technology_parent_technology.rb @@ -1,4 +1,4 @@ -class TechnologyParentTechnology < ActiveRecord::Base +class TechnologyParentTechnology < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/technology_planet.rb b/app/models/content_groupers/technology_planet.rb index 4106617b..56756e74 100644 --- a/app/models/content_groupers/technology_planet.rb +++ b/app/models/content_groupers/technology_planet.rb @@ -1,4 +1,4 @@ -class TechnologyPlanet < ActiveRecord::Base +class TechnologyPlanet < ApplicationRecord belongs_to :user belongs_to :technology belongs_to :planet diff --git a/app/models/content_groupers/technology_related_technology.rb b/app/models/content_groupers/technology_related_technology.rb index 80f61185..98564b6e 100644 --- a/app/models/content_groupers/technology_related_technology.rb +++ b/app/models/content_groupers/technology_related_technology.rb @@ -1,4 +1,4 @@ -class TechnologyRelatedTechnology < ActiveRecord::Base +class TechnologyRelatedTechnology < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_groupers/technology_town.rb b/app/models/content_groupers/technology_town.rb index 5a1b8742..e1b1bd90 100644 --- a/app/models/content_groupers/technology_town.rb +++ b/app/models/content_groupers/technology_town.rb @@ -1,4 +1,4 @@ -class TechnologyTown < ActiveRecord::Base +class TechnologyTown < ApplicationRecord belongs_to :user belongs_to :technology belongs_to :town diff --git a/app/models/content_groupers/town_citizen.rb b/app/models/content_groupers/town_citizen.rb index 89ecfef1..97450ded 100644 --- a/app/models/content_groupers/town_citizen.rb +++ b/app/models/content_groupers/town_citizen.rb @@ -1,4 +1,4 @@ -class TownCitizen < ActiveRecord::Base +class TownCitizen < ApplicationRecord belongs_to :user belongs_to :town belongs_to :citizen, class_name: 'Character' diff --git a/app/models/content_groupers/town_country.rb b/app/models/content_groupers/town_country.rb index 20de024a..0b098f73 100644 --- a/app/models/content_groupers/town_country.rb +++ b/app/models/content_groupers/town_country.rb @@ -1,4 +1,4 @@ -class TownCountry < ActiveRecord::Base +class TownCountry < ApplicationRecord belongs_to :user belongs_to :town belongs_to :country diff --git a/app/models/content_groupers/town_creature.rb b/app/models/content_groupers/town_creature.rb index 23a8542b..aa573e17 100644 --- a/app/models/content_groupers/town_creature.rb +++ b/app/models/content_groupers/town_creature.rb @@ -1,4 +1,4 @@ -class TownCreature < ActiveRecord::Base +class TownCreature < ApplicationRecord belongs_to :user belongs_to :town belongs_to :creature diff --git a/app/models/content_groupers/town_flora.rb b/app/models/content_groupers/town_flora.rb index 27fe5e65..e8e54cee 100644 --- a/app/models/content_groupers/town_flora.rb +++ b/app/models/content_groupers/town_flora.rb @@ -1,4 +1,4 @@ -class TownFlora < ActiveRecord::Base +class TownFlora < ApplicationRecord belongs_to :user belongs_to :town belongs_to :flora diff --git a/app/models/content_groupers/town_group.rb b/app/models/content_groupers/town_group.rb index f03d23f4..7237f73e 100644 --- a/app/models/content_groupers/town_group.rb +++ b/app/models/content_groupers/town_group.rb @@ -1,4 +1,4 @@ -class TownGroup < ActiveRecord::Base +class TownGroup < ApplicationRecord belongs_to :user belongs_to :town belongs_to :group diff --git a/app/models/content_groupers/town_language.rb b/app/models/content_groupers/town_language.rb index 714fe424..325d842b 100644 --- a/app/models/content_groupers/town_language.rb +++ b/app/models/content_groupers/town_language.rb @@ -1,4 +1,4 @@ -class TownLanguage < ActiveRecord::Base +class TownLanguage < ApplicationRecord belongs_to :user belongs_to :town belongs_to :language diff --git a/app/models/content_groupers/town_nearby_landmark.rb b/app/models/content_groupers/town_nearby_landmark.rb index d70d501f..ac109257 100644 --- a/app/models/content_groupers/town_nearby_landmark.rb +++ b/app/models/content_groupers/town_nearby_landmark.rb @@ -1,4 +1,4 @@ -class TownNearbyLandmark < ActiveRecord::Base +class TownNearbyLandmark < ApplicationRecord belongs_to :user belongs_to :town belongs_to :nearby_landmark, class_name: 'Landmark' diff --git a/app/models/content_groupers/wildlifeship.rb b/app/models/content_groupers/wildlifeship.rb index 3ee3c864..ea23f72c 100644 --- a/app/models/content_groupers/wildlifeship.rb +++ b/app/models/content_groupers/wildlifeship.rb @@ -1,4 +1,4 @@ -class Wildlifeship < ActiveRecord::Base +class Wildlifeship < ApplicationRecord include HasContentLinking belongs_to :user diff --git a/app/models/content_types/character.rb b/app/models/content_types/character.rb index 263a75e0..2c16dcbc 100644 --- a/app/models/content_types/character.rb +++ b/app/models/content_types/character.rb @@ -6,7 +6,7 @@ # 1. a person in a User's story. # # exists within a Universe. -class Character < ActiveRecord::Base +class Character < ApplicationRecord acts_as_paranoid validates :name, presence: true diff --git a/app/models/content_types/country.rb b/app/models/content_types/country.rb index af12cae3..ae711760 100644 --- a/app/models/content_types/country.rb +++ b/app/models/content_types/country.rb @@ -1,4 +1,4 @@ -class Country < ActiveRecord::Base +class Country < ApplicationRecord acts_as_paranoid validates :name, presence: true diff --git a/app/models/content_types/creature.rb b/app/models/content_types/creature.rb index 96a3edce..eb66c424 100644 --- a/app/models/content_types/creature.rb +++ b/app/models/content_types/creature.rb @@ -6,7 +6,7 @@ # 1. an animal, plant, or other wildlife occuring in a user's story # # exists within a Universe. -class Creature < ActiveRecord::Base +class Creature < ApplicationRecord acts_as_paranoid validates :name, presence: true diff --git a/app/models/content_types/deity.rb b/app/models/content_types/deity.rb index 5a26435e..0ab82e0f 100644 --- a/app/models/content_types/deity.rb +++ b/app/models/content_types/deity.rb @@ -1,4 +1,4 @@ -class Deity < ActiveRecord::Base +class Deity < ApplicationRecord acts_as_paranoid belongs_to :user diff --git a/app/models/content_types/flora.rb b/app/models/content_types/flora.rb index 04cfc626..c468b828 100644 --- a/app/models/content_types/flora.rb +++ b/app/models/content_types/flora.rb @@ -1,4 +1,4 @@ -class Flora < ActiveRecord::Base +class Flora < ApplicationRecord acts_as_paranoid validates :name, presence: true diff --git a/app/models/content_types/government.rb b/app/models/content_types/government.rb index 0194e836..68380241 100644 --- a/app/models/content_types/government.rb +++ b/app/models/content_types/government.rb @@ -1,4 +1,4 @@ -class Government < ActiveRecord::Base +class Government < ApplicationRecord acts_as_paranoid belongs_to :user diff --git a/app/models/content_types/group.rb b/app/models/content_types/group.rb index 1134daaa..d719550e 100644 --- a/app/models/content_types/group.rb +++ b/app/models/content_types/group.rb @@ -1,4 +1,4 @@ -class Group < ActiveRecord::Base +class Group < ApplicationRecord acts_as_paranoid validates :name, presence: true diff --git a/app/models/content_types/item.rb b/app/models/content_types/item.rb index 3a31338c..0111f8cc 100644 --- a/app/models/content_types/item.rb +++ b/app/models/content_types/item.rb @@ -6,7 +6,7 @@ # 1. the necessary items for a particular purpose. # # exists within a Universe. -class Item < ActiveRecord::Base +class Item < ApplicationRecord acts_as_paranoid validates :name, presence: true diff --git a/app/models/content_types/landmark.rb b/app/models/content_types/landmark.rb index 54a1931a..4b4e222d 100644 --- a/app/models/content_types/landmark.rb +++ b/app/models/content_types/landmark.rb @@ -1,4 +1,4 @@ -class Landmark < ActiveRecord::Base +class Landmark < ApplicationRecord acts_as_paranoid validates :name, presence: true diff --git a/app/models/content_types/language.rb b/app/models/content_types/language.rb index c253c119..e38ae189 100644 --- a/app/models/content_types/language.rb +++ b/app/models/content_types/language.rb @@ -1,4 +1,4 @@ -class Language < ActiveRecord::Base +class Language < ApplicationRecord acts_as_paranoid validates :name, presence: true diff --git a/app/models/content_types/location.rb b/app/models/content_types/location.rb index 988e5150..3b41ddcf 100644 --- a/app/models/content_types/location.rb +++ b/app/models/content_types/location.rb @@ -6,7 +6,7 @@ # 1. a particular place or position # # exists within a Universe -class Location < ActiveRecord::Base +class Location < ApplicationRecord acts_as_paranoid # todo: clear these -- not used anymore diff --git a/app/models/content_types/magic.rb b/app/models/content_types/magic.rb index 4f864dde..35a28a4a 100644 --- a/app/models/content_types/magic.rb +++ b/app/models/content_types/magic.rb @@ -1,4 +1,4 @@ -class Magic < ActiveRecord::Base +class Magic < ApplicationRecord acts_as_paranoid validates :name, presence: true diff --git a/app/models/content_types/planet.rb b/app/models/content_types/planet.rb index 8a6b9346..7b2e5b39 100644 --- a/app/models/content_types/planet.rb +++ b/app/models/content_types/planet.rb @@ -1,4 +1,4 @@ -class Planet < ActiveRecord::Base +class Planet < ApplicationRecord acts_as_paranoid belongs_to :user diff --git a/app/models/content_types/race.rb b/app/models/content_types/race.rb index f30845d8..1335e3c4 100644 --- a/app/models/content_types/race.rb +++ b/app/models/content_types/race.rb @@ -4,7 +4,7 @@ # _noun_ # # 1. each of the major divisions of sentient life, having distinct physical characteristics -class Race < ActiveRecord::Base +class Race < ApplicationRecord acts_as_paranoid validates :name, presence: true diff --git a/app/models/content_types/religion.rb b/app/models/content_types/religion.rb index 93cbd12c..0489e48f 100644 --- a/app/models/content_types/religion.rb +++ b/app/models/content_types/religion.rb @@ -1,4 +1,4 @@ -class Religion < ActiveRecord::Base +class Religion < ApplicationRecord acts_as_paranoid validates :name, presence: true diff --git a/app/models/content_types/scene.rb b/app/models/content_types/scene.rb index 1df6411d..1a199d52 100644 --- a/app/models/content_types/scene.rb +++ b/app/models/content_types/scene.rb @@ -1,4 +1,4 @@ -class Scene < ActiveRecord::Base +class Scene < ApplicationRecord acts_as_paranoid validates :name, presence: true diff --git a/app/models/content_types/technology.rb b/app/models/content_types/technology.rb index 2f3b928d..e68b5402 100644 --- a/app/models/content_types/technology.rb +++ b/app/models/content_types/technology.rb @@ -1,4 +1,4 @@ -class Technology < ActiveRecord::Base +class Technology < ApplicationRecord acts_as_paranoid belongs_to :user diff --git a/app/models/content_types/town.rb b/app/models/content_types/town.rb index 647e96a9..665f3629 100644 --- a/app/models/content_types/town.rb +++ b/app/models/content_types/town.rb @@ -1,4 +1,4 @@ -class Town < ActiveRecord::Base +class Town < ApplicationRecord acts_as_paranoid validates :name, presence: true diff --git a/app/models/content_types/universe.rb b/app/models/content_types/universe.rb index 5deb9a38..23d19aee 100644 --- a/app/models/content_types/universe.rb +++ b/app/models/content_types/universe.rb @@ -5,7 +5,7 @@ # 1. a particular sphere of activity, interest, or experience # # contains all canonically-related content created by Users -class Universe < ActiveRecord::Base +class Universe < ApplicationRecord acts_as_paranoid include HasAttributes diff --git a/app/models/contributor.rb b/app/models/contributor.rb index 0d023851..7a65754f 100644 --- a/app/models/contributor.rb +++ b/app/models/contributor.rb @@ -1,4 +1,4 @@ -class Contributor < ActiveRecord::Base +class Contributor < ApplicationRecord belongs_to :universe belongs_to :user end diff --git a/app/models/document.rb b/app/models/document.rb index e7253649..5460290a 100644 --- a/app/models/document.rb +++ b/app/models/document.rb @@ -1,3 +1,3 @@ -class Document < ActiveRecord::Base +class Document < ApplicationRecord belongs_to :user end diff --git a/app/models/image_upload.rb b/app/models/image_upload.rb index dbb64441..d9676e25 100644 --- a/app/models/image_upload.rb +++ b/app/models/image_upload.rb @@ -1,4 +1,4 @@ -class ImageUpload < ActiveRecord::Base +class ImageUpload < ApplicationRecord belongs_to :user has_attached_file :src, diff --git a/app/models/raffle_entry.rb b/app/models/raffle_entry.rb index 602c5e55..82f89839 100644 --- a/app/models/raffle_entry.rb +++ b/app/models/raffle_entry.rb @@ -1,3 +1,3 @@ -class RaffleEntry < ActiveRecord::Base +class RaffleEntry < ApplicationRecord belongs_to :user end diff --git a/app/models/referral.rb b/app/models/referral.rb index c10a9abc..42a39084 100644 --- a/app/models/referral.rb +++ b/app/models/referral.rb @@ -1,4 +1,4 @@ -class Referral < ActiveRecord::Base +class Referral < ApplicationRecord def referrer User.find_by(id: self.referrer_id) end diff --git a/app/models/referral_code.rb b/app/models/referral_code.rb index 88ae4dea..5f36629b 100644 --- a/app/models/referral_code.rb +++ b/app/models/referral_code.rb @@ -1,3 +1,3 @@ -class ReferralCode < ActiveRecord::Base +class ReferralCode < ApplicationRecord belongs_to :user end diff --git a/app/models/stripe_event_log.rb b/app/models/stripe_event_log.rb index d649b9e5..1183aeac 100644 --- a/app/models/stripe_event_log.rb +++ b/app/models/stripe_event_log.rb @@ -1,2 +1,2 @@ -class StripeEventLog < ActiveRecord::Base +class StripeEventLog < ApplicationRecord end diff --git a/app/models/subscription.rb b/app/models/subscription.rb index ac9e48d0..73ee991d 100644 --- a/app/models/subscription.rb +++ b/app/models/subscription.rb @@ -1,4 +1,4 @@ -class Subscription < ActiveRecord::Base +class Subscription < ApplicationRecord belongs_to :user belongs_to :billing_plan end diff --git a/app/models/user.rb b/app/models/user.rb index 893b6d5d..69aec707 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -2,7 +2,7 @@ require 'digest/md5' ## # a person using the Notebook.ai web application. Owns all other content. -class User < ActiveRecord::Base +class User < ApplicationRecord acts_as_paranoid # Include default devise modules. Others available are: diff --git a/app/models/user_content_type_activator.rb b/app/models/user_content_type_activator.rb index a0600911..640cfc18 100644 --- a/app/models/user_content_type_activator.rb +++ b/app/models/user_content_type_activator.rb @@ -1,3 +1,3 @@ -class UserContentTypeActivator < ActiveRecord::Base +class UserContentTypeActivator < ApplicationRecord belongs_to :user end diff --git a/app/models/votable.rb b/app/models/votable.rb index d3e37483..e277a0ad 100644 --- a/app/models/votable.rb +++ b/app/models/votable.rb @@ -1,3 +1,3 @@ -class Votable < ActiveRecord::Base +class Votable < ApplicationRecord has_many :votes end diff --git a/app/models/vote.rb b/app/models/vote.rb index e6386738..dad382a5 100644 --- a/app/models/vote.rb +++ b/app/models/vote.rb @@ -1,4 +1,4 @@ -class Vote < ActiveRecord::Base +class Vote < ApplicationRecord belongs_to :user belongs_to :votable end diff --git a/app/views/content/display/_image_card_header.html.erb b/app/views/content/display/_image_card_header.html.erb index bffc8dc9..1c0e7b3e 100644 --- a/app/views/content/display/_image_card_header.html.erb +++ b/app/views/content/display/_image_card_header.html.erb @@ -4,7 +4,7 @@ <% if @content.image_uploads.any? %> <% @content.image_uploads.each do |image| %>
  • - <%= image_tag image.src %> + <%= image_tag image.src.url(:large) %>

    <%= @content.name %>

    <%= @content.description %>
    @@ -21,4 +21,4 @@
  • <% end %> - \ No newline at end of file + diff --git a/app/views/layouts/_navbar.html.erb b/app/views/layouts/_navbar.html.erb index 92d5bcb6..17b10cf5 100644 --- a/app/views/layouts/_navbar.html.erb +++ b/app/views/layouts/_navbar.html.erb @@ -152,16 +152,18 @@