Snippet: Rails this_year? monkey patch

index > dev > language > ruby

module DateAndTime
  module Calculations
    def this_year?
      year == ::Date.current.year
    end
  end
end