# 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
# 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
# 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
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