Skip to content
This repository has been archived by the owner on May 4, 2021. It is now read-only.

Commit

Permalink
Fail on definition if date_format not passed to map_date
Browse files Browse the repository at this point in the history
  • Loading branch information
malakai97 committed Oct 26, 2016
1 parent a33d100 commit 40fec08
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/adapters/adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 40fec08

Please sign in to comment.