Add
get "demo/hello" => "your-controller#your/action"
to your .rb routes
For instance:
application / controllers / demos_controller.rb:
class DemosController < ApplicationController def hello end end
application / views / demos / hello.html.erb:
<p>Hello World</p>
config / routes.rb:
get "demo/hello" => "demos#hello"
UPDATE: From comments: read the guide on guides for more details: http://guides.rubyonrails.org/routing.html
source share