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
.bundle | |
db/*.sqlite3* | |
log/*.log | |
*.log | |
/tmp/ | |
doc/ | |
*.swp | |
*~ | |
.DS_Store | |
.rvmrc* |
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 new APP_NAME -m http://railswizard.org/48c15b50eff428bc421f.rb | |
rails generate mongoid:config | |
rails generate jquery:install |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Spike</title> | |
<%= csrf_meta_tag %> | |
<!--[if lt IE 9]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
<%= stylesheet_link_tag 'blueprint/screen', :media => 'screen' %> | |
<%= stylesheet_link_tag 'blueprint/print', :media => 'print' %> |
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
Mongoid/Hierarchy | |
# Get all child +Documents+ to this +Document+, going n levels deep if | |
# necessary. This is used when calling update persistence operations from | |
# the root document, where changes in the entire tree need to be | |
# determined. Note that persistence from the embedded documents will | |
# always be preferred, since they are optimized calls... This operation | |
# can get expensive in domains with large hierarchies. | |
# | |
# @example Get all the document's children. |
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
git ls-files | grep '\.swp$' | xargs git rm |
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
macbook:bs_portal Ben$ rails g migration add_translations_table --orm=active_record |
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
!!! 5 | |
%html | |
%head | |
<!--[if lt IE 9]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
%title Bens Scraps | |
%link(rel="stylesheet" href="css/blueprint/screen.css" media="screen") | |
%link(rel="stylesheet" href="css/blueprint/print.css" media="print") | |
%link(rel="stylesheet" href="css/custom.css") |
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
namespace :alertzy do | |
desc "Populate June 2011 data" | |
task :populate_june => :environment do | |
generate_june_data | |
end | |
end | |
def generate_june_data | |
mondays = [6,13,20,27] | |
tuesdays = [7,14,21,28] |
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
mongoid.attributes.user.email |
OlderNewer