Created
August 22, 2011 05:05
-
-
Save tatsuosakurai/1161697 to your computer and use it in GitHub Desktop.
rails memo
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
# blank project | |
rails new app_name -T -J -d mysql | |
cd app_name | |
bundle | |
# rails g jquery:install #3.1、3.2から不要? | |
rails g rspec:install | |
rails g controller sample index | |
rails g model book name:string hoge:integer user:references | |
rake db:migrate | |
# メソッドの定義されている場所を探す | |
Model.method(:method_name).source_location | |
# Factory | |
FactoryGirl.define do | |
factory : user do | |
sequence(:name){|n| "use_#{n}" } | |
end | |
factory :belonging do | |
association :user | |
end | |
end | |
# gem | |
gem pristine gem名 #gemをインストール時の状態に戻す | |
# bundler | |
$GEM_HOME #システムにインストールされたGemが格納されるディレクトリへの環境変数 | |
# Pry | |
pry -r ./config/environment | |
# gerrit | |
git commit --amend --author="tatsuo.sakurai <t.sakurai@everyleaf.com>" | |
# git | |
git remote -v | |
# coffee | |
@hoge_fuga = 0 | |
@["hoge_#{fuga}"] = 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment