File: public\input.html
Using Select Controls
Working With Select Controls
This Ruby on Rails application lets you read data from select controls.
File: app\controllers\hello_controller.rb
class HelloController < ApplicationController
def there
@data = params[:select1]
end
end
File: app\views\hello\there.rhtml
Reading data from select controls
Reading data from select controls
This Ruby on Rails application reads data from select controls.
You selected <% for data in @data %>
<%= data %>
<% end %>
Start the WEBrick server: ruby script/server
Navigate to http://localhost:3000/input.html.
readMultipleSelections.zip( 91 k)