Wim,

I just tried it out, and it works fine for me – if I type a name that
doesn't exist, then that name is submitted.

In the controller:

  auto_complete_for :supplier, :name

In the action:

  render :text => "Name = #{params[:supplier][:name]}"

And in the view:

  <%= text_field_with_auto_complete :supplier, :name %>

If this doesn't help you, maybe you could post some code?

/Lasse

2010/3/25 Wim Van Dijck <[email protected]>

> Hi,
>
> I'm a rails noob, tring to teach myself, so feel free to point me to
> the correct FM if need be ;-)
>
> I'm playing with the auto_complete plugin. I have a page to manage
> expenses, and there's field 'supplier' to whom the expense is paid.
> I can successfully retrieve the suppliers name from the suppliers
> table, but when I type a name that doesn't exist yet, and submit,
> nothing gets submitted?
>
> Can anyone shed any light to why that is?
> Ideally, in this situation, I'd like to be redirected to the supplier
> model 'new' page, but I can settle for it just accepting what I type?
>
> Best regards,
> Wim
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<rubyonrails-talk%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en.

Reply via email to