Skip to content

Instantly share code, notes, and snippets.

@cored

cored/test.rb Secret

Created September 13, 2016 12:25
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 cored/265d25d48b98a25f6e33ef289e1a0c8d to your computer and use it in GitHub Desktop.
Save cored/265d25d48b98a25f6e33ef289e1a0c8d to your computer and use it in GitHub Desktop.
require "virtus"
class Record
include Virtus.model
attribute :name, String, default: ""
end
r = Record.new(name: nil)
puts "it is still nil" if r.name.nil?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment