Sha256: f7944c63a9ca72bb1dc02dd32100a06662929a53ccde4e7fb5cd3d58ab7acd0c

Contents?: true

Size: 280 Bytes

Versions: 2

Compression:

Stored size: 280 Bytes

Contents

module Shared
  def conditions_for_range(start_time, end_time, options = {})
    field = connection.quote_table_name(table_name) << '.' << connection.quote_column_name(options[:field] || "created_at")
    ["#{field} >= ? AND #{field} <= ?", start_time.utc, end_time.utc]
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
by_star-0.3.1 lib/shared.rb
by_star-0.3.0 lib/shared.rb