Sha256: c2f0f0a3d6d70624bf596fa61f64cc6463603032c43884e83d332fb5fbc6586a

Contents?: true

Size: 1.14 KB

Versions: 22

Compression:

Stored size: 1.14 KB

Contents

module ActiveRecord
  module ConnectionAdapters
    module Sqlserver
      module CoreExt
        module ActiveRecord
          
          extend ActiveSupport::Concern
          
          included do
            class_attribute :coerced_sqlserver_date_columns, :coerced_sqlserver_time_columns
            self.coerced_sqlserver_date_columns = Set.new
            self.coerced_sqlserver_time_columns = Set.new
          end

          module ClassMethods
            
            def execute_procedure(proc_name, *variables)
              if connection.respond_to?(:execute_procedure)
                connection.execute_procedure(proc_name,*variables)
              else
                []
              end
            end

            def coerce_sqlserver_date(*attributes)
              self.coerced_sqlserver_date_columns += attributes.map(&:to_s)
            end

            def coerce_sqlserver_time(*attributes)
              self.coerced_sqlserver_time_columns += attributes.map(&:to_s)
            end

          end

        end
      end
    end
  end
end


ActiveRecord::Base.send :include, ActiveRecord::ConnectionAdapters::Sqlserver::CoreExt::ActiveRecord

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
activerecord-sqlserver-adapter-3.2.18 lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb
activerecord-sqlserver-adapter-3.2.17 lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb
activerecord-sqlserver-adapter-3.2.16 lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb
activerecord-sqlserver-adapter-3.2.15 lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb
activerecord-sqlserver-adapter-3.2.14 lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb
activerecord-sqlserver-adapter-3.2.13 lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb
sic-activerecord-sqlserver-adapter-4.0.0 lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb
activerecord-sqlserver-adapter-3.2.12 lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb
activerecord-sqlserver-adapter-3.2.11 lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb
activerecord-sqlserver-adapter-3.2.10 lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb
activerecord-sqlserver-adapter-3.2.9 lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb
activerecord-sqlserver-adapter-3.2.8 lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb
activerecord-sqlserver-adapter-3.2.7 lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb
activerecord-sqlserver-adapter-3.2.6 lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb
activerecord-sqlserver-adapter-3.2.5 lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb
activerecord-sqlserver-adapter-3.2.4 lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb
activerecord-sqlserver-adapter-3.2.3 lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb
activerecord-sqlserver-adapter-3.2.2 lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb
activerecord-sqlserver-adapter-3.2.1 lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb
activerecord-sqlserver-adapter-3.2.0 lib/active_record/connection_adapters/sqlserver/core_ext/active_record.rb