Skip to content
New issue

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

Remove unnecessary assert_date_from_db #25372

Merged
merged 1 commit into from
Jun 13, 2016

Conversation

kamipo
Copy link
Member

@kamipo kamipo commented Jun 12, 2016

assert_date_from_db was added at 6a2104d for SQL Server.
But latest sqlserver adapter work to pass expected behavior since
8e4624b.

`assert_date_from_db` was added at 6a2104d for SQL Server.
But latest sqlserver adapter work to pass expected behavior since
8e4624b.
@rails-bot
Copy link

r? @senny

(@rails-bot has picked a reviewer for you, use r? to override)

@sgrif
Copy link
Contributor

sgrif commented Jun 13, 2016

@metaskills Can you confirm this is fine to merge?

@kamipo
Copy link
Member Author

kamipo commented Jun 13, 2016

FYI: In sqlserver adapter 4.2, using SQLServer::Type::Date (inherits AcitveRecord::Type::Date) for deserializing date column value.

https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/blob/v4.2.0/lib/active_record/connection_adapters/sqlserver_adapter.rb#L216-L217

        # Date and Time
        m.register_type              'date',              SQLServer::Type::Date.new

https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/blob/v4.2.0/lib/active_record/connection_adapters/sqlserver/type/date.rb

module ActiveRecord
  module ConnectionAdapters
    module SQLServer
      module Type
        class Date < ActiveRecord::Type::Date

          # When FreeTDS/TinyTDS casts this data type natively.
          # include Castable

        end
      end
    end
  end
end

@metaskills
Copy link
Contributor

Can you confirm this is fine to merge?

LGTM. I can pretty much cope with anything as needed later. FWIW, I just started the Rails 5 work yesterday. So I'll come back with issues as needed later.

@sgrif sgrif merged commit 2806203 into rails:master Jun 13, 2016
@kamipo kamipo deleted the remove_assert_date_from_db branch June 13, 2016 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants