Created
April 1, 2015 13:27
-
-
Save ChrisMacNaughton/18285351af2c0ee97024 to your computer and use it in GitHub Desktop.
Example of somewhat static pages with a controller
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
.jumbotron | |
.container | |
%h1 This is the best home page ever! | |
%p | |
We can sell anything with this! | |
%p | |
=link_to "Sign Up Now", new_user_registration_path, class: 'btn btn-success' |
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
.container | |
.row | |
%h1.page-header Pricing | |
.row | |
Here are some awesome plans! | |
= @plans |
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.application.routes.draw do | |
root to: 'visitors#index' | |
get 'pricing', to: 'visitors#pricing', as: 'pricing' | |
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
class VisitorsController < ApplicationController | |
def pricing | |
@plans = Plan.featured.order(price: :asc) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment