Returns the year for each month by period - nested case statements
Assuming that billing_increment is always an integer that is a factor of 12, the code should be entirely formulaic.

def return_year_by_month_and_period(month)
  period_len = property_water.first.billing_increment.to_i
  if 12 % period_len != 0
    # TODO: decide what the appropriate behavior should be
    self.property_water.first.year
  else
    nth_period = (month - 1) / period_len + 1
    property_water.where(period: nth_period).first.year
  end
end


I've incorporated additional suggestions from @tokland:


In Ruby it's not idiomatic to write self., nor parens on calls without arguments.
Write the second case in an else. Full conditional branches are easier to read.