Skip to content

Commit

Permalink
[BUGFIX] ArgumentError: wrong number of arguments (2 for 0)
Browse files Browse the repository at this point in the history
This makes all tests pass on Rails 2.3.14
  • Loading branch information
mjonuschat committed Dec 21, 2011
1 parent e367a69 commit 613cf31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/routing_filter/filters/extension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def initialize(*args)

def around_recognize(path, env, &block)
extract_extension!(path) unless excluded?(path)
yield(path, env)
yield
end

def around_generate(params, &block)
Expand Down
4 changes: 2 additions & 2 deletions lib/routing_filter/filters/pagination.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Pagination < Filter

def around_recognize(path, env, &block)
page = extract_segment!(PAGINATION_SEGMENT, path)
yield(path, env).tap do |params|
yield.tap do |params|
params[:page] = page.to_i if page
end
end
Expand All @@ -44,4 +44,4 @@ def append_page?(page)
page && page.to_i != 1
end
end
end
end

0 comments on commit 613cf31

Please sign in to comment.