Skip to content

Commit 4d2b9a0

Browse files
cesartwlgebhardt
authored andcommitted
ensures options is a hash
1 parent af90e12 commit 4d2b9a0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/jsonapi/resource.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ def filters(*attrs)
279279
@_allowed_filters.merge!(attrs.inject( Hash.new ) { |h, attr| h[attr] = {}; h })
280280
end
281281

282-
def filter(attr, opts={})
283-
@_allowed_filters[attr.to_sym] = opts
282+
def filter(attr, *args)
283+
@_allowed_filters[attr.to_sym] = args.extract_options!
284284
end
285285

286286
def primary_key(key)

0 commit comments

Comments
 (0)