Skip to content

Commit 17c14ba

Browse files
committed
Merge pull request #272 from pmukerji/remove-unused-key-attribute
Remove unused @key attribute
2 parents 3a30d2f + f5433f9 commit 17c14ba

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/jsonapi/association.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def initialize(name, options={})
1919
super
2020
@class_name = options.fetch(:class_name, name.to_s.capitalize)
2121
@type = class_name.underscore.pluralize.to_sym
22-
@foreign_key ||= @key.nil? ? "#{name}_id".to_sym : @key
22+
@foreign_key ||= "#{name}_id".to_sym
2323
end
2424
end
2525

@@ -28,7 +28,7 @@ def initialize(name, options={})
2828
super
2929
@class_name = options.fetch(:class_name, name.to_s.capitalize.singularize)
3030
@type = class_name.underscore.pluralize.to_sym
31-
@foreign_key ||= @key.nil? ? "#{name.to_s.singularize}_ids".to_sym : @key
31+
@foreign_key ||= "#{name.to_s.singularize}_ids".to_sym
3232
end
3333
end
3434
end

0 commit comments

Comments
 (0)