Revert "Switch to using the zeitwork autoloader"

This reverts commit 127880a73f.
This commit is contained in:
Tom Hughes 2020-12-29 19:26:58 +00:00
parent 5677877ed1
commit e392556444
4 changed files with 16 additions and 8 deletions

View file

@ -2,7 +2,7 @@
# validation method to be included like any other validations methods
# in the models definitions. this one checks that the named attribute
# is a valid UTF-8 format string.
class UTF8Validator < ActiveModel::EachValidator
class Utf8Validator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
record.errors.add(attribute, " is invalid UTF-8") unless UTF8.valid? value
end

View file

@ -31,6 +31,9 @@ module OpenStreetMap
# Custom directories with classes and modules you want to be autoloadable.
config.autoload_paths += %W[#{config.root}/lib]
# Continue to use the classic autoloader for now
config.autoloader = :classic
# Force requests from old versions of IE (<= IE8) to be UTF-8 encoded.
# This has defaulted to false since rails 6.0
config.action_view.default_enforce_utf8 = true

View file

@ -3,9 +3,14 @@
# Add new inflection rules using the following format. Inflections
# are locale specific, and you may define rules for as many different
# locales as you wish. All of these examples are active by default:
ActiveSupport::Inflector.inflections(:en) do |inflect|
inflect.acronym "GPX"
inflect.acronym "ID"
inflect.acronym "OSM"
inflect.acronym "UTF8"
end
# ActiveSupport::Inflector.inflections(:en) do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
# end
# These inflection rules are supported but not enabled by default:
# ActiveSupport::Inflector.inflections(:en) do |inflect|
# inflect.acronym 'RESTful'
# end

View file

@ -1,6 +1,6 @@
require "migrate"
class CreateOSMDb < ActiveRecord::Migration[4.2]
class CreateOsmDb < ActiveRecord::Migration[4.2]
def self.up
create_table "current_nodes", :id => false do |t|
t.column "id", :bigint, :null => false