Do math in your rails routes.
First, check out config/routes.rb
, all the business
logic is there. Then see the demo.
Make sure all your dependencies are covered:
bundle install
Start up the Rails server:
rails s
The server will now be running locally at localhost:3000
.
Navigating to /2/plus/2
will render a page with 4
.
Navigating to /3/minus/-3
will render a page with 6
.
Navigating to /-4/times/3
will render a page with -12
.
Navigating to /9/by/3
will render a page with 3
.
© 2015 Josh Branchaud
This project is licensed under the MIT license. See LICENSE
for details.