I hope your bug is as simple as the fact that you used "not_omelette"
in one case, and "is_omelette" in the other.  :)

I confirmed that we do use this pattern in a couple of working apps,
so there is something else going on...

Bryan


On Jan 14, 10:36 am, Pete <[email protected]> wrote:
> Hi,
>
> I have very recently discovered an issue with the sorting (order_by)
> on a Table plus.
>
> I thought maybe I had changed something in my app, that had broken the
> sorting to work properly, but this appears to happen in the tutorials
> I had done too.
>
> My table plus gathers data using a named scope, so I can restrict by
> various conditions.
>
> This works perfectly well when first loading the page, and based on
> the below named scope, shows (for arguments sake) only the Omelet
> recipe.
>
> However, now when I click on the heading to order by count, country,
> or title, every record is shown from the database, and the named scope
> restrictions are forgotten. (this never happened before, sorting
> always worked perfectly)
>
>  --------------------
> My named scope, followed by index definition for the page.
>
> named_scope :not_omlette, {:conditions => {:title => "Omelet"}}
>
> def index
>
> hobo_index Recipe.is_omlette.apply_scopes(:search =>
> [params[:search],:title,:body],
> :order_by => parse_sort_param(:title, :country, :count))
> end
> -------------------------
>
> This is incredibly frustrating, as I cannot see why this should
> suddenly start happening? Any ideas?
>
> I am on rails 2.3.8
> ruby 1.87
>
> and hobo 1.0.2
>
> Many thanks
>
> Pete

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