Sha256: a9a4df31822d3ea5ed9af7f3133cd15e063e9afccd787430f395fcaddaaf8e1d

Contents?: true

Size: 282 Bytes

Versions: 4

Compression:

Stored size: 282 Bytes

Contents

module Graphiti
  module Adapters
    module ActiveRecord
      module Inferrence
        def infer_foreign_key
          parent_model = parent_resource_class.model
          parent_model.reflections[association_name.to_s].foreign_key.to_sym
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
graphiti-1.0.alpha.5 lib/graphiti/adapters/active_record/inferrence.rb
graphiti-1.0.alpha.4 lib/graphiti/adapters/active_record/inferrence.rb
graphiti-1.0.alpha.1 lib/graphiti/adapters/active_record/inferrence.rb
graphiti-rb-1.0.alpha.1 lib/graphiti/adapters/active_record/inferrence.rb