Created
September 10, 2011 02:08
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ gem install high_voltage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ rails generate controller Pages contact aboutus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PagesController < ApplicationController | |
def aboutus | |
end | |
def contact | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
match 'aboutus', :to => 'pages#aboutus' | |
match 'contact', :to => 'pages#contact' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= link_to 'About Us', aboutus_url %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment