diff --git a/TODO b/TODO index a95370e..c9fa331 100644 --- a/TODO +++ b/TODO @@ -1,2 +1 @@ -* Merge Scope and Array methods * Make it possible to use this pattern: http://www.percona.com/ppc2009/PPC2009_mysql_pagination.pdf \ No newline at end of file diff --git a/lib/peiji_san/view_helper.rb b/lib/peiji_san/view_helper.rb index 1042ac3..a300295 100644 --- a/lib/peiji_san/view_helper.rb +++ b/lib/peiji_san/view_helper.rb @@ -21,7 +21,7 @@ module ViewHelper DEFAULT_PEIJI_SAN_OPTIONS = { # For link_to_page :page_parameter => :page, - :anchor => :explore, + :anchor => nil, :current_class => :current, # For pages_to_link_to :max_visible => 11, diff --git a/test/view_helper_test.rb b/test/view_helper_test.rb index 9aea326..7bda41c 100644 --- a/test/view_helper_test.rb +++ b/test/view_helper_test.rb @@ -44,11 +44,11 @@ def url_for(options) include PeijiSan::ViewHelper it "should return a link for a given page number" do - link_to_page(2, collection).should == '2' + link_to_page(2, collection).should == '2' end it "should return a link for a given page number with the specified page parameter" do - link_to_page(2, collection, :page_parameter => 'pagina').should == '2' + link_to_page(2, collection, :page_parameter => 'pagina').should == '2' end it "should return a link for a given page number with the specified anchor" do @@ -57,7 +57,7 @@ def url_for(options) it "should return a link for a given page number and include the original params" do controller.params[:starts_with] = 'h' - link_to_page(2, collection).should == '2' + link_to_page(2, collection).should == '2' end it "should return a link which does not include the page GET variable if it's page number 1" do @@ -67,12 +67,12 @@ def url_for(options) it "should return a link with the class current if it's for the currently selected page" do collection.stubs(:current_page?).with(2).returns(true) - link_to_page(2, collection).should == '2' + link_to_page(2, collection).should == '2' end it "should return a link with the class current if it's for the currently selected page" do collection.stubs(:current_page?).with(2).returns(true) - link_to_page(2, collection, :current_class => 'looking_at').should == '2' + link_to_page(2, collection, :current_class => 'looking_at').should == '2' end end