I am getting this error, when tried to access the form.
NoMethodError in People#new
Showing /home/local/PENNYWISE/venkatab/Desktop/rails/dynalists/app/
views/people/_form.html.erb where line #26 raised:
undefined method `observe_field' for #<#<Class:0x007f511c403ed0>:
0x007f511c347cd0>Extracted source (around line #26):
23:     <%= f.label :state_id, "state" %><br />24:     <div id=
"states_div">25:     <%= f.collection_select :state_id,
@states, :id, :name %>26:     <%=
observe_field :person_country_id, :url => { :action =>
"update_state_div"} , :with => :person_country_id %>27:     </div>28:
</div>29:   <div class="actions">Trace of template inclusion: app/
views/people/new.html.erb

i am following this http://thecloudview.com/dynamic-select-lists-with-ruby-on-rails-and-ajax/
, and doing the same.I doubt prototype in rails3 have no method of
observe_field.
On Jan 8, 11:07 pm, Bill Walton wrote:
On Sun, Jan 8, 2012 at 11:40 AM, venkata reddy

wrote:
As i already mentioned above, i am using 3.0.10 here and the default
js library is prototype. But still i am not able make observe_field
working.
Missed that.  Sorry.  In that case I'd need to know more about what
'not working' means.  You might want to start by looking at the page
source.  Is the ajax code there?  If so, is its url pointing to the
action you expect it to be pointing to?  Using Firebug (you can't do
much debugging of ajax without it), when the field changes is the ajax
firing and generating the expected post in the console?  If you
haven't already, put some logging in the controller action.  Is it
getting fired?  With the expected parameter(s)?  Etc...

HTH,
Bill
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 10 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJan 8, '12 at 7:58a
activeJan 10, '12 at 12:54p
posts10
users6
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2022 Grokbase