Fixed that pagination_helper would ignore :params #947 [Sebastian Kanthak]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1017 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 d3e1e030
*SVN*
* Fixed that pagination_helper would ignore :params #947 [Sebastian Kanthak]
* Added :owerwrite_params back to url_for and friends -- it was AWL since the introduction of Routes #921 [raphinou]
* Added :position option to link_to_remote/form_remote_tag that can be either :before, :top, :bottom, or :after and specifies where the return from the method should be inserted #952 [Matthew McCray/Sam Stephenson]
......
......@@ -45,7 +45,7 @@ def pagination_links(paginator, options={})
returning html = '' do
if options[:always_show_anchors] and not window_pages[0].first?
html << link_to(first.number, options[:name] => first)
html << link_to(first.number, { options[:name] => first }.update( options[:params] ))
html << ' ... ' if window_pages[0].number - first.number > 1
html << ' '
end
......@@ -54,14 +54,14 @@ def pagination_links(paginator, options={})
if paginator.current == page && !options[:link_to_current_page]
html << page.number.to_s
else
html << link_to(page.number, options[:name] => page)
html << link_to(page.number, { options[:name] => page }.update( options[:params] ))
end
html << ' '
end
if options[:always_show_anchors] && !window_pages.last.last?
html << ' ... ' if last.number - window_pages[-1].number > 1
html << link_to(paginator.last.number, options[:name] => last)
html << link_to(paginator.last.number, { options[:name] => last }.update( options[:params]))
end
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册