module

ActiveSupport::RangeWithFormat

Range With Format

Constants

RANGE_FORMATS = {\ndb: -> (start, stop) do\nif start && stop\ncase start\nwhen String then "BETWEEN '#{start}' AND '#{stop}'"\nelse\n"BETWEEN '#{start.to_fs(:db)}' AND '#{stop.to_fs(:db)}'"\nend\nelsif start\ncase start\nwhen String then ">= '#{start}'"\nelse\n">= '#{start.to_fs(:db)}'"\nend\nelsif stop\ncase stop\nwhen String then "<= '#{stop}'"\nelse\n"<= '#{stop.to_fs(:db)}'"\nend\nend\nend\n}

Files

  • activesupport/lib/active_support/core_ext/range/conversions.rb