Wow. This is like watching a good episode of House. : -)

On Wed, Nov 24, 2010 at 1:17 PM, Matt Jones <[email protected]> wrote:

> More info: this is the commit that b0rked us:
>
>
> https://github.com/rails/rails/commit/bfbdeeae3080c89a0b27e42d684cbeb6206c6f60
>
> And here's a related LH ticket:
>
> https://rails.lighthouseapp.com/projects/8994/tickets/5915
>
> BTW, adding this line:
>
> named_scope :scoped, lambda { |scope| scope }
>
> to the Translation model makes the spec go from failing to passing.
> Completely removing the method_missing definition from
> named_scope_extensions.rb has the same effect, but I believe that will break
> automatic scopes.
>
> --Matt Jones
>
> On Nov 24, 2010, at 9:44 AM, Bryan Larsen wrote:
>
> > Yes, it does seem that there are two problems.
> >
> > Hobo 1.0.2 breaks the "include" scope.
> >
> > Rails 2.3.9 breaks chained scopes.
> >
> > Bryan
> >
> > On 10-11-24 08:38 AM, Matt Jones wrote:
> >> Not 100% sure this is related - I'm getting the same failure with Hobo
> 1.0.1 (which doesn't include the mentioned commit) and any Rails version
> higher than 2.3.8.
> >>
> >> To sum up:
> >>
> >> Rails 2.3.8 + Hobo 1.0.1: Gert's spec passes
> >> Rails 2.3.9 + Hobo 1.0.1: Gert's spec fails
> >>
> >> Something on this list:
> >>
> >> https://github.com/rails/rails/compare/v2.3.8...v2.3.9
> >>
> >> Is breaking things, but I can't figure out what...
> >>
> >> --Matt Jones
> >>
> >> On Nov 24, 2010, at 8:21 AM, Bryan Larsen wrote:
> >>
> >>> Yes, I noticed a subset of that yesterday, and reopened #839:
> https://hobo.lighthouseapp.com/projects/8324/tickets/839-ruby-head-doctests-fail-on-192
> >>>
> >>> Could those affected, please try reverting the change to
> hobo/lib/hobo/scopes/named_scope_extensions.rb in this commit?
> >>>
> >>>
> https://github.com/tablatom/hobo/commit/07362c9a6b50c2d8d218c5c0532044d6e2f9c63a
> >>>
> >>> It appears that respond_to? was being called for its side effects.
> (it can actually be moved to the previous line -- it doesn't need to be in
> the if statement).
> >>>
> >>> thanks,
> >>> Bryan
> >>>
> >>>
> >>> On 10-11-24 07:14 AM, Gert Thiel wrote:
> >>>> Dear fellow Hobo users.
> >>>>
> >>>> Using the Rails i18n 0.4.2 gem including I18n::Backend::ActiveRecord I
> >>>> discovered that Hobo 1.0.2 kills Rails' chained scopes feature.
> >>>>
> >>>> Model.scoped({ :conditions =>   {:field1 =>
> >>>> value} }).scoped({ :conditions =>   {:field2 =>   another_value} })
> >>>>
> >>>> should return only record filtered by both :field1 and :field2. But if
> >>>> I use Hobo I get all records with :field2 = another_value.
> >>>>
> >>>> With Hobo only the very last scope of every scope chain survives.
> >>>>
> >>>> I created a spec to prove my point:
> >>>>
> >>>> https://github.com/GertThiel/HoboKillsRailsChainedScopes
> >>>>
> >>>> You can observe the bug with Hobo included in the Gemfile or resolve
> >>>> the bug by omitting Hobo from the Gemfile.
> >>>>
> >>>> BTW: This is the part of code of I18n::Backend::ActiveRecord which
> >>>> suffers from the bug:
> >>>>
> >>>>
> https://github.com/svenfuchs/i18n/blob/v0.4.2/lib/i18n/backend/active_record.rb#L34
> >>>>
> >>>> I'm sorry to have to report such a severe bug.
> >>>>
> >>>> Regards,
> >>>>
> >>>> Gert Thiel
> >>>>
> >>>
> >>> --
> >>> You received this message because you are subscribed to the Google
> Groups "Hobo Users" group.
> >>> To post to this group, send email to [email protected].
> >>> To unsubscribe from this group, send email to
> [email protected]<hobousers%[email protected]>
> .
> >>> For more options, visit this group at
> http://groups.google.com/group/hobousers?hl=en.
> >>>
> >>
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> "Hobo Users" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> [email protected]<hobousers%[email protected]>
> .
> > For more options, visit this group at
> http://groups.google.com/group/hobousers?hl=en.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Hobo Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<hobousers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/hobousers?hl=en.
>
>


-- 
Thanks,

Owen

Owen Dall, Chief Systems Architect
Barquin International
www.barquin.com
Cell: 410-991-0811

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to