Skip to content

Instantly share code, notes, and snippets.

@ChrisMacNaughton
Created April 1, 2015 13:27
Show Gist options
  • Save ChrisMacNaughton/18285351af2c0ee97024 to your computer and use it in GitHub Desktop.
Save ChrisMacNaughton/18285351af2c0ee97024 to your computer and use it in GitHub Desktop.
Example of somewhat static pages with a controller
.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'
.container
.row
%h1.page-header Pricing
.row
Here are some awesome plans!
= @plans
Rails.application.routes.draw do
root to: 'visitors#index'
get 'pricing', to: 'visitors#pricing', as: 'pricing'
end
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