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
Show hidden 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
view raw
field.rb
hosted with ❤ by
GitHub