Skip to content
Browse files

Merge pull request #32 from yabawock/rails-2.3

Fix "ArgumentError: wrong number of arguments (2 for 0)" on Rails 2.3.14
  • Loading branch information...
2 parents 990e0be + 613cf31 commit b20ede7369f06fcc083788e6e286eae1bb4033d7 @yabawock yabawock committed
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/routing_filter/filters/extension.rb
  2. +2 −2 lib/routing_filter/filters/pagination.rb
View
2 lib/routing_filter/filters/extension.rb
@@ -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)
View
4 lib/routing_filter/filters/pagination.rb
@@ -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
@@ -44,4 +44,4 @@ def append_page?(page)
page && page.to_i != 1
end
end
-end
+end

0 comments on commit b20ede7

Please sign in to comment.
Something went wrong with that request. Please try again.