Hi,

> undefined method `default_order' for #<Array:0x7f64e203c660>
> hobo (1.3.0.pre14) lib/hobo/controller/model.rb:454:in `find_or_paginate'

A patch in https://hobo.lighthouseapp.com/projects/8324/tickets/833 includes 
that bug.

Try:

diff --git a/hobo/lib/hobo/controller/model.rb 
b/hobo/lib/hobo/controller/model.rb
index 00eede9..efc45a3 100644
--- a/hobo/lib/hobo/controller/model.rb
+++ b/hobo/lib/hobo/controller/model.rb
@@ -439,7 +439,7 @@ module Hobo
       do_pagination = options.delete(:paginate) && 
finder.respond_to?(:paginate)
       finder = Array.wrap(options.delete(:scope)).inject(finder) { |a, v| 
a.send(*Array.wrap(v).flatten) }
 
-      options[:order] = finder.default_order unless options[:order] || 
finder.try.order_values.present?
+      options[:order] ||= finder.try.default_order unless 
finder.try.order_values.present?
 
       if do_pagination
         options.reverse_merge!(:page => params[:page] || 1)

-----
Tomoaki Hayasaka <[email protected]>

-- 
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