diff --git a/app/adapters/adapter.rb b/app/adapters/adapter.rb index bb615c31..9d7b3f71 100644 --- a/app/adapters/adapter.rb +++ b/app/adapters/adapter.rb @@ -20,6 +20,7 @@ def map_simple(model_field, public_field) # @param [Symbol] public_field # @param [String] date_format The Date format to use. def map_date(model_field, public_field, date_format) + raise ArgumentError, "date_format cannot be nil" if date_format.nil? map_from_public public_field do |value| {model_field => time_from_public(value)} end diff --git a/config/application.rb b/config/application.rb index af43e35b..e51f164a 100644 --- a/config/application.rb +++ b/config/application.rb @@ -46,6 +46,8 @@ class Application < Rails::Application :request_specs => true end + require_relative 'time_formats' + end end end diff --git a/config/initializers/time_formats.rb b/config/time_formats.rb similarity index 100% rename from config/initializers/time_formats.rb rename to config/time_formats.rb