We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There's a bug where tables with date columns can't be filtered by a date range because an exception is raised.
date
No errors should be raised and filter applied correctly.
An error is raised: ArgumentError: wrong number of arguments (given 1, expected 0).
ArgumentError: wrong number of arguments (given 1, expected 0)
require "bundler/inline" gemfile(true) do source "https://rubygems.org/" gem "tiny_tds" gem "activerecord", "6.1.4" gem "activerecord-sqlserver-adapter", "6.1.0.0" end require "active_record" require "minitest/autorun" require "logger" ActiveRecord::Base.establish_connection( adapter: "sqlserver", timeout: 5000, pool: 100, encoding: "utf8", database: "mydatabase", username: "myusername", password: "mypassword", host: "myhost", port: 1433, ) ActiveRecord::Base.logger = Logger.new(STDOUT) ActiveRecord::Schema.define do drop_table :bugs rescue nil create_table :bugs, force: true do |t| t.date :report_date end end Bug = Class.new(ActiveRecord::Base) class BugTest < Minitest::Test def test_date_range date_1 = Date.new(2021, 8, 7) date_2 = Date.new(2021, 8, 7) Bug.create!(report_date: date_2) assert_equal 1, Bug.where(report_date: date_2..Date::Infinity.new).count end end
6.1.4
6.1.0.0
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Issue
There's a bug where tables with
date
columns can't be filtered by a date range because an exception is raised.Expected behavior
No errors should be raised and filter applied correctly.
Actual behavior
An error is raised:
ArgumentError: wrong number of arguments (given 1, expected 0)
.How to reproduce
Details
6.1.4
6.1.0.0
The text was updated successfully, but these errors were encountered: