Created
February 19, 2018 14:48
-
-
Save Schwad/bcdcf551f628a3f8bdd7e035dbf2a1a7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AttributesApiExample < ApplicationRecord | |
attribute :start_date, :date, default: -> { 1.day.from_now } | |
attribute :end_date, :date, default: -> { 8.days.from_now } | |
attribute :my_attribute, :my_type, default: -> { 'My Default Value' } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment