#248 ✓resolved
Ken Collins

Updated NamedScope Patching

Reported by Ken Collins | September 29th, 2008 @ 08:25 PM

The old named_scope patches for 1.2.6 had issue. Basically it would remove the scope of the proxy owner at certain time. Very odd bug but I found it while creating my GroupedScope plugin and uses WillPaginate's named_scope patches in my 1.2.6 app.

This patch updates NamedScope to the latest an has two patch files for 1.2.6 and 2.0.4. I have even updated the rake test_all to use 2.0.4 and not 2.0.2. There is an odd bug when running the tests for 1.2.6, for some reason the mocha setup from its test case was triggering the ArrayPaginationTest to start loading fixtures. Since there were no table names, it had an argument error since Fixtures were converting nil to an empty string and table_names ended up looking like this [""]. See the full error below. My solution was to add an empty setup to the ArrayPaginationTest so that mocha would hit that.

Right now all tests are passing for all rails versions.

1) Error: test_argument_error_with_params_and_another_argument(ArrayPaginationTest): ArgumentError: interning empty string

/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/active_record/fixtures.rb:251:in `to_sym'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/active_record/fixtures.rb:251:in `create_fixtures'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/active_record/fixtures.rb:250:in `map'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/active_record/fixtures.rb:250:in `create_fixtures'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/active_record/base.rb:867:in `silence'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/active_record/fixtures.rb:248:in `create_fixtures'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/active_record/fixtures.rb:593:in `load_fixtures'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/active_record/fixtures.rb:547:in `setup'
/opt/local/lib/ruby/gems/1.8/gems/mocha-0.9.1/lib/mocha/test_case_adapter.rb:68:in `run'

Comments and changes to this ticket

  • Mislav

    Mislav October 7th, 2008 @ 11:39 AM

    • State changed from “new” to “resolved”

    Wow. Thanks for all the hard work!

    Applied

  • vehez

    vehez July 15th, 2020 @ 03:41 PM

    Thank you for the update, very nice site..
    travelers within

  • vehez

    vehez August 1st, 2020 @ 08:53 AM

    This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information...
    roof replacement

  • vehez

    vehez August 1st, 2020 @ 09:03 AM

    This is very educational content and written well for a change. It's nice to see that some people still understand how to write a quality post!
    roof replacement central coast

  • vehez

    vehez August 4th, 2020 @ 01:31 PM

    Your work is very good and I appreciate you and hopping for some more informative posts. Thank you for sharing great information to us.
    tarot cards

  • vehez

    vehez August 4th, 2020 @ 08:01 PM

    This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information...
    read here

  • vehez

    vehez August 8th, 2020 @ 10:40 AM

    Yes i am totally agreed with this article and i just want say that this article is very nice and very informative article.I will make sure to be reading your blog more. You made a good point but I can't help but wonder, what about the other side? !!!!!!THANKS!!!!!!
    Top 30 SD-WAN providers

  • vehez

    vehez August 13th, 2020 @ 12:41 PM

    I think this is one of the most significant information for me. And i’m glad reading your article. But should remark on some general things, The web site style is perfect, the articles is really great : D. Good job, cheers
    Fitness

  • vehez

    vehez August 13th, 2020 @ 02:10 PM

    Hello I am so delighted I located your blog, I really located you by mistake, while I was watching on google for something else, Anyways I am here now and could just like to say thank for a tremendous post and a all round entertaining website. Please do keep up the great work.
    hẹn hò

  • vehez

    vehez September 25th, 2020 @ 10:04 AM

    I am happy to find this post very useful for me, as it contains lot of information. I always prefer to read the quality content and this thing I found in you post. Thanks for sharing.
    Hilkom Digital

  • syeduytt

    syeduytt September 27th, 2020 @ 06:42 PM

    Thank you again for all the knowledge you distribute,Good post. I was very interested in the article, it's quite inspiring I should admit. I like visiting you site since I always come across interesting articles like this one.Great Job, I greatly appreciate that.Do Keep sharing! Regards,
    homeostasis

  • syeduytt

    syeduytt September 29th, 2020 @ 12:33 PM

    This is my first time visit here. From the tons of comments on your articles,I guess I am not only one having all the enjoyment right here!
    smart home

  • syeduytt

    syeduytt October 7th, 2020 @ 04:04 PM

    This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! keep up the good work
    dich vu seo tu khoa

  • cryptoloveshop

    cryptoloveshop June 7th, 2021 @ 04:11 PM

    • Assigned user cleared.

    Hello. I have browsed most of your posts. This post is probably where I got the most useful information for my research. Thanks for posting. maybe we can see more on this. Are you aware of any other websites on this subject.
    security

  • cryptoloveshop

    cryptoloveshop June 12th, 2021 @ 07:35 AM

    • Assigned user set to “Mislav”

    I really appreciate the kind of topics you post here. Thanks for sharing us a great information that is actually helpful. Good day!
    thin brick

  • cryptoloveshop

    cryptoloveshop June 12th, 2021 @ 08:25 AM

    Positive site. where did u come up with the information on this posting? I'm pleased I discovered it though. ill be checking back soon to find out what additional posts you include.
    cbd

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Everyone's favorite Ruby library for pagination of practically anything!

People watching this ticket

Attachments

Pages