To Examples

TemperatureConverter2 Example

Directions

  1. Create a new Rails project named TemperatureConverter2.
  2. Create a controller named Convert with views input and display.
  3. Source code for the views: input.html.erb   display.html.erb
  4. Source code for the controller:   convert_controller.rb
  5. Source code for the style sheet:   convert.scss
  6. In the config/routes.rb file, add a post route for the display view:
    post "convert/display"
    
  7. View the input view of this example with this URL:
    http://localhost:3000/convert/input