From 8a99d594223115beef2cba51b2f3de205c47d278 Mon Sep 17 00:00:00 2001 From: Gerhard Schlager Date: Mon, 18 Mar 2019 23:13:47 +0100 Subject: [PATCH] FIX: seed data classes couldn't always be found --- app/controllers/admin/site_texts_controller.rb | 3 +++ db/fixtures/500_categories.rb | 2 ++ db/fixtures/990_topics.rb | 2 ++ lib/tasks/i18n.rake | 2 ++ 4 files changed, 9 insertions(+) diff --git a/app/controllers/admin/site_texts_controller.rb b/app/controllers/admin/site_texts_controller.rb index 46998cdfb8d..74dde2b3991 100644 --- a/app/controllers/admin/site_texts_controller.rb +++ b/app/controllers/admin/site_texts_controller.rb @@ -1,3 +1,6 @@ +require_dependency 'seed_data/categories' +require_dependency 'seed_data/topics' + class Admin::SiteTextsController < Admin::AdminController def self.preferred_keys diff --git a/db/fixtures/500_categories.rb b/db/fixtures/500_categories.rb index 5a6376f0821..3146ba4397e 100644 --- a/db/fixtures/500_categories.rb +++ b/db/fixtures/500_categories.rb @@ -1,3 +1,5 @@ +require 'seed_data/categories' + if !Rails.env.test? SeedData::Categories.with_default_locale.create end diff --git a/db/fixtures/990_topics.rb b/db/fixtures/990_topics.rb index 0a5ede29346..73c8f887273 100644 --- a/db/fixtures/990_topics.rb +++ b/db/fixtures/990_topics.rb @@ -1,3 +1,5 @@ +require 'seed_data/topics' + User.reset_column_information Topic.reset_column_information Post.reset_column_information diff --git a/lib/tasks/i18n.rake b/lib/tasks/i18n.rake index e543917187d..17e8cb4c8b9 100644 --- a/lib/tasks/i18n.rake +++ b/lib/tasks/i18n.rake @@ -1,4 +1,6 @@ require 'i18n/locale_file_checker' +require 'seed_data/categories' +require 'seed_data/topics' require 'colored2' desc "Checks locale files for errors"