On Fri, Sep 21, 2012 at 9:12 AM, Lille <lille.pengu...@gmail.com> wrote:

> Hey,
>
> I'm able to duplicate everything in Ryan Bates' screencast on jQueryUI
> autocomplete 
> (#102<http://railscasts.com/episodes/102-auto-complete-association-revised>),
> except for the piece that calls the server for completion data.
>
> Here is my view html:
>
> <input data-autocomplete-source="/searches" id="search-markets"
> name="search-markets" placeholder="market keyword and/or location"
> size="50" type="text" autocomplete="off">
>

> Now, this coffeescript works...
>
> $('#search-markets').autocomplete
> source: ['foo', 'food', 'four']
>
> ...whereas, this coffeescript trying to tap the server...
>
> $('#search-markets').autocomplete ->
> source: $('#search-markets').data('autocomplete-source')
>
> ...results in http POST calls to the root and not the
> data-autocomplete-source value of '/searches'.
>

There seems to be nothing wrong in your code.  All I can think of that
causes this is if another dom element
has an id of search-markets.  Can you confirm that your view only has one
dom with this id?


>
> Bates's railscast uses a textfield in the context of a RESTful form, but I
> don't expect this difference between his code and mine should explain my
> unexpected POST.
>
> Any thoughts?
>
> Lille
>
>
>  --
> 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 rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/rubyonrails-talk/-/jZaSqsd38YQJ.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
-------------------------------------------------------------
visit my blog at http://jimlabs.heroku.com

-- 
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to