hi,
i've 2 tables as locations and customers. they have "has_many"
rel'ship.(1 loc has many custs). i'd gone thru
http://trix.pl/blog/ruby-on-rails/auto-complete-for-rails-2-0-tutorial
this tutorial that worked fine. but my issue is, i want to have an auto
complete text field for customer_id in new location form that will show
customer name but store id in the table when created. Can anybody help
in this? I hope i've provided enough details...
That's suspicious, do you have the command-line client installed and
in the PATH?
-- fxn
i didn't get you. but i'm using tortoise and could create an SVN for
model_auto_completer. now i have model_auto_completer folder with
lib,tasks,test etc. i then copied it to my rails appl in vender/plugin.
So you have now
vendor/plugins/model_auto_completer
?
i also had gone through the docs, but still couldn't understand how to
use it.
If the installer doesn't add Subversion to your path, you can add it
yourself in the properties of My Computer, under the Advanced tab,
clicking on the button labeled Environment Variables, and adding it to
the PATH environment variable. After your next login, you can use svn
from the command line.
i didn't get you. but i'm using tortoise and could create an SVN for
model_auto_completer. now i have model_auto_completer folder with
lib,tasks,test etc. i then copied it to my rails appl in vender/
plugin.
So you have now
vendor/plugins/model_auto_completer
?
i also had gone through the docs, but still couldn't understand how to
use it.
@Xavier,
yes, but not able to decide which method to use... i tried those methods
and that gave me the error as "undefined method
`belongs_to_auto_completer'"
If that's how you are using it already it may happen that the plugin is not under vendor/plugins, or the server was not restarted....
Unrelated to that error message, but just in case, remember that as in anything related to Ajax you need to include some JavaScript libraries, for example this way:
yes, but not able to decide which method to use... i tried those
methods
and that gave me the error as "undefined method
`belongs_to_auto_completer'"
That's a helper and should be used in views.
If that's how you are using it already it may happen that the plugin
is not under vendor/plugins, or the server was not restarted....
Unrelated to that error message, but just in case, remember that as in
anything related to Ajax you need to include some JavaScript
libraries, for example this way:
<%= javascript_include_tag :defaults %>
-- fxn
i tried all the ways. the folder is in vendor/plugins and server
restarted many times. also, have <%= javascript_include_tag :defaults %>
in my common template as well as in the page and have latest
prototype.js and scriptaculous.js. but the prb still persist. one more
thing is, text_field_with_auto_complete works fine but theres a prb that
i mentioned in my first post. don't understand what exactly the prb
is... i'll paste the code tomorrow to get more clear idea, if needed.
Hey, got this thing worked, my mistake... i was putting the code in
wrong place. it should be in customers and not in locations. Thanks for
the help, anyways...