Skip to content

Commit

Permalink
fix(pagy): deprecated_var is a class method (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
rainerborene authored Jun 14, 2021
1 parent 49afdf7 commit 7e9c9cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pagy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def self.root
# Merge and validate the options, do some simple arithmetic and set the instance variables
def initialize(vars)
@vars = VARS.merge( vars.delete_if{|k,v| VARS.key?(k) && (v.nil? || v == '') } )
@vars[:fragment] = deprecated_var(:anchor, @vars[:anchor], :fragment, @vars[:fragment]) if @vars[:anchor]
@vars[:fragment] = Pagy.deprecated_var(:anchor, @vars[:anchor], :fragment, @vars[:fragment]) if @vars[:anchor]

INSTANCE_VARS_MIN.each do |name,min|
raise VariableError.new(self), "expected :#{name} >= #{min}; got #{@vars[name].inspect}" \
Expand Down

0 comments on commit 7e9c9cd

Please sign in to comment.