-
-
Save maxloncar/90eaf79560e568b32ca0c14073bff69b to your computer and use it in GitHub Desktop.
Field
This file contains 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
field :published_this_year, Boolean, "Has the book been published this year", null: false | |
def published_this_year | |
object.year_published == Date.current.year | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment