LifecycleState type breaks table-plus sorting
Reported by Matt Jones | May 6th, 2010 @ 07:27 PM | in Hobo 1.1
The code that's detecting included objects in the automatic order_by scope is being fooled by the table_name accessor added to LifecycleState as part of the fix for #551. The result is that you can't sort by the field and instead get an error since LifecycleState doesn't respond to name_attribute.
Would changing the check (on line 258 of automatic_scopes.rb) to
respond_to?(:name_attribute)
be a sensible fix?
Comments and changes to this ticket
-
Bryan Larsen May 19th, 2010 @ 05:54 PM
- Milestone set to Hobo 1.1
- State changed from new to open
we could always
respond_to?(:table_name) && respond_to?(:name_attribute)
if we think:name_attribute
isn't sufficient. The tests pass with just:name_attribute
, and I think that's sufficient. -
Bryan Larsen June 14th, 2010 @ 03:48 PM
- State changed from open to resolved
(from [4c082405d35a847767f2a4e9c493e2752ecaa05c]) [#721 state:resolved] LifecycleState breaks table-plus sorting (from Matt Jones)
http://github.com/tablatom/hobo/commit/4c082405d35a847767f2a4e9c493... -
Bryan Larsen November 3rd, 2010 @ 02:18 AM
- Milestone order changed from 0 to 0
(from [c32268f61898773f3c3335ff45128518fd8f9337]) [#721 state:resolved] LifecycleState breaks table-plus sorting (from Matt Jones) http://github.com/tablatom/hobo/commit/c32268f61898773f3c3335ff4512...
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.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
People watching this ticket
Referenced by
- 721 LifecycleState type breaks table-plus sorting (from [4c082405d35a847767f2a4e9c493e2752ecaa05c]) [#721 s...
- 721 LifecycleState type breaks table-plus sorting (from [c32268f61898773f3c3335ff45128518fd8f9337]) [#721 s...