Skip to content

Instantly share code, notes, and snippets.

@cannapages
cannapages / header.css.scss
Created April 15, 2013 22:21
Fixed nav html and css
$header_height: 100px;
.header {
position: fixed;
width: 100%;
height: $header_height;
background-color: $light_blue;
.container {
position: relative;
width: 950px;
height: $header_height;
@cannapages
cannapages / gist:5359221
Created April 10, 2013 23:04
Concerning an example
module Reversable
extend ActiveSupport::Concern
module ClassMethods
def do_it
puts "holly molly this is how to bootstrap"
all.each do |post|
post.revers_content
end
end
@cannapages
cannapages / gist:5358916
Last active December 16, 2015 01:59
A simple mention able model
class Post < ActiveRecord::Base
..
def content_for_view
content.html_safe
end
before_save :create_mentionable_links_in_post
def create_mentionable_links_in_post