I had a dropdown. I need to add a textbox when the value changes in the dropdown. I had done this using "obseve_field" tag in rails 2.3.5. Now I am moving into rails 3. So how I write it in rails 3.
标签:
ruby-on-rails-3
相关问题
- Eager-loading association count with Arel (Rails 3
- Rails simple model attributes not saved to databas
- jquery-ui progressbar not showing
- PDF attachment in email is called 'Noname'
- Is it possible to use redirect_to when it's ca
相关文章
- “No explicit conversion of Symbol into String” for
- Rspec controller error expecting <“index”> but
- Factory_girl has_one relation with validates_prese
- Rails: Twitter Bootstrap Buttons when visited get
- is there a “rails” way to redirect if mobile brows
- Got ActiveRecord::AssociationTypeMismatch on model
- superclass mismatch for class CommentsController (
- rails 3, how add a simple confirmation dialog when
If you want to use the legacy Prototype helpers (like
observe_field
) in Rails 3, check out the GitHub repository forprototype_legacy_helper
.Otherwise, you can write this JavaScript yourself using the new UJS. See these two blocks of code for the old
observe_field
method:and see Part 2 at http://www.simonecarletti.com/blog/2010/06/unobtrusive-javascript-in-rails-3/ to see how to do this in jQuery.