firstruby

Master ruby with us

select with :onchange in Ruby on Rails

Posted by firstruby on November 2, 2008

In Ruby on Rails, We can use ‘select’ with :onchange as following code block,

= f.select :my_attribute, @my_values.collect{|a| [a.name, a.id]}, {}, { :onChange => 'remote_function(blabla....)' }

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: