Re: [Rails] Re: rails and javascript

2012-03-02 Thread Dev Guy
On Wed, Feb 29, 2012 at 11:21 PM, Alpha Blue wrote: > There are a few ways to do this.  If you are looking for an ajax > response you can do the following: > > (this is an example with a new action) > > <%= form_for Model.new, :remote => true do |f| %> > > Your Label > >  <%= f.collection_select(

[Rails] Re: rails and javascript

2012-02-29 Thread Alpha Blue
There are a few ways to do this. If you are looking for an ajax response you can do the following: (this is an example with a new action) <%= form_for Model.new, :remote => true do |f| %> Your Label <%= f.collection_select(:some_id, Model.all, :id, :name, :class => 'yourclass' %> <% end