Skip to content

Instantly share code, notes, and snippets.

@stim371
Created September 10, 2011 02:08
Show Gist options
  • Save stim371/1207834 to your computer and use it in GitHub Desktop.
Save stim371/1207834 to your computer and use it in GitHub Desktop.
setting up static routes in the routes.rb and view files. you need to create an empty controller for Pages where each view gets an empty method.
$ gem install high_voltage
$ rails generate controller Pages contact aboutus
class PagesController < ApplicationController
def aboutus
end
def contact
end
end
match 'aboutus', :to => 'pages#aboutus'
match 'contact', :to => 'pages#contact'
<%= link_to 'About Us', aboutus_url %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment