Sha256: 7755fbdea3869dfe9ed03263b3e05e2179d26e1dfa20e2c94da441fbce930eb0
Contents?: true
Size: 307 Bytes
Versions: 24
Compression:
Stored size: 307 Bytes
Contents
module Spyke module Associations class BelongsTo < Association def initialize(*args) super @options.reverse_merge!(uri: "/#{klass.model_name.plural}/:id", foreign_key: "#{klass.model_name.param_key}_id") @params[:id] = parent.try(foreign_key) end end end end
Version data entries
24 entries across 24 versions & 1 rubygems