Sha256: 03705e74ea26e5c66f5cbae0c58cf56c682a380f06b2324ed420aa1b052deacb

Contents?: true

Size: 755 Bytes

Versions: 139

Compression:

Stored size: 755 Bytes

Contents

# frozen_string_literal: true

require_dependency "renalware/feeds"
require "attr_extras"

module Renalware
  module Feeds
    module Files
      module PracticeMemberships
        class ImportCSV
          pattr_initialize :csv_path

          def call
            import_practice_memberships_csv_using_sql_function
          end

          private

          # See migration for SQL function definition
          def import_practice_memberships_csv_using_sql_function
            conn = ActiveRecord::Base.connection
            conn.execute(
              "SELECT renalware.import_practice_memberships_csv(
                #{conn.quote(csv_path.realpath.to_s)}::text
              )"
            )
          end
        end
      end
    end
  end
end

Version data entries

139 entries across 139 versions & 1 rubygems

Version Path
renalware-core-2.0.116 app/models/renalware/feeds/files/practice_memberships/import_csv.rb
renalware-core-2.0.115 app/models/renalware/feeds/files/practice_memberships/import_csv.rb
renalware-core-2.0.113 app/models/renalware/feeds/files/practice_memberships/import_csv.rb
renalware-core-2.0.112 app/models/renalware/feeds/files/practice_memberships/import_csv.rb
renalware-core-2.0.111 app/models/renalware/feeds/files/practice_memberships/import_csv.rb
renalware-core-2.0.110 app/models/renalware/feeds/files/practice_memberships/import_csv.rb
renalware-core-2.0.109 app/models/renalware/feeds/files/practice_memberships/import_csv.rb
renalware-core-2.0.108 app/models/renalware/feeds/files/practice_memberships/import_csv.rb
renalware-core-2.0.106 app/models/renalware/feeds/files/practice_memberships/import_csv.rb
renalware-core-2.0.105 app/models/renalware/feeds/files/practice_memberships/import_csv.rb
renalware-core-2.0.104 app/models/renalware/feeds/files/practice_memberships/import_csv.rb
renalware-core-2.0.103 app/models/renalware/feeds/files/practice_memberships/import_csv.rb
renalware-core-2.0.102 app/models/renalware/feeds/files/practice_memberships/import_csv.rb
renalware-core-2.0.101 app/models/renalware/feeds/files/practice_memberships/import_csv.rb
renalware-core-2.0.100 app/models/renalware/feeds/files/practice_memberships/import_csv.rb
renalware-core-2.0.99 app/models/renalware/feeds/files/practice_memberships/import_csv.rb
renalware-core-2.0.98 app/models/renalware/feeds/files/practice_memberships/import_csv.rb
renalware-core-2.0.97 app/models/renalware/feeds/files/practice_memberships/import_csv.rb
renalware-core-2.0.96 app/models/renalware/feeds/files/practice_memberships/import_csv.rb
renalware-core-2.0.95 app/models/renalware/feeds/files/practice_memberships/import_csv.rb