def manufacturer_model
    "#{manufacturer.name} - #{model_of_machine}"
  end

I have the same problem even if I try to use :name on 
the hobo_completions and set the model_of_machine field to have :name => 
true on it.

On Tuesday, October 9, 2012 12:44:17 PM UTC-4, Bryan Larsen wrote:
>
> Can you post the code for manufacturer_model?   If it's coded properly 
> to return a scope, I think it should work. 
>
> Another option is that you can define manufacturer_model as a has_many 
> with different :conditions set, but that's a very Rails2 way of doing 
> things... 
>
> Bryan 
>
>
> On Tue, Oct 9, 2012 at 12:38 PM, Bob Sleys <[email protected] <javascript:>> 
> wrote: 
> > I'm trying to setup a name-one it wasn't working so I tried calling the 
> > autocomplete directly from the web browser but I keep getting the 
> following 
> > error. 
> > 
> > NoMethodError in MachinesController#complete_select_model 
> > 
> > undefined method `limit' for #<Array:0x00000006c8d8d0> 
> > 
> > 
> > I've traced it down to the hobo_completions I've setup 
> > 
> >   autocomplete :select_model do 
> >       hobo_completions :manufacturer_model, MachineModel.find(:all) 
> >   end 
> > 
> > What it boils down to is I have a manufacturer_model method in my 
> > MachineModel to provide the list of 'names' I'd like to use. IE I don't 
> want 
> > to just use the name field so a basic autocomplete won't work.  I've 
> tried 
> > adding a limit=>10 to the find query but that didn't help. 
> > 
> > Any ides would be appreciated. 
> > 
> > Thanks 
> > Bob 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "Hobo Users" group. 
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msg/hobousers/-/SlwPYDOi7NAJ. 
> > To post to this group, send email to [email protected]<javascript:>. 
>
> > To unsubscribe from this group, send email to 
> > [email protected] <javascript:>. 
> > 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 view this discussion on the web visit 
https://groups.google.com/d/msg/hobousers/-/sr006-Y4FaQJ.
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