Skip to content

Instantly share code, notes, and snippets.

@aokolish
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aokolish/4d7722b99d789d733a82 to your computer and use it in GitHub Desktop.
Save aokolish/4d7722b99d789d733a82 to your computer and use it in GitHub Desktop.
rails 4 argument out of range issue
# rails 3, invalid times are set to nil
> m = Model.new some_timestamp: '2010-33-22T09:30:25Z'
=> #<Model ...>
> m.some_timestamp
=> nil
# rails 4, invalid times raise an exception
> m = Model.new some_timestamp: '2010-33-22T09:30:25Z'
=> ArgumentError: argument out of range
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment