lib/jsonapi/association.rb in jsonapi-resources-0.2.0 vs lib/jsonapi/association.rb in jsonapi-resources-0.3.0.pre1

- old
+ new

@@ -4,18 +4,10 @@ def initialize(name, options={}) @name = name.to_s @options = options @acts_as_set = options.fetch(:acts_as_set, false) == true - @key = options[:key] ? options[:key].to_sym : nil - - if @key.nil? - @foreign_key = options[:foreign_key ] ? options[:foreign_key ].to_sym : nil - else - # :nocov: - warn '[DEPRECATION] `key` is deprecated in associations. Please use `foreign_key` instead.' - # :nocov: - end + @foreign_key = options[:foreign_key ] ? options[:foreign_key ].to_sym : nil end def primary_key @primary_key ||= Resource.resource_for(@name)._primary_key end