rails g rspec:install
した後の、カレントディレクトリにある、
.rspec
その2行目の --warnings を削除。
この行があると、Gem パッケージに起因する警告がターミナルに表示される。
config.before(:suite) do
FactoruGirl.reload
end
テストのスイート前にリロードをかける。
Springの為の処理。
<%= render 'shared/footer' %>
ERBの中で使用されるrenderメソッドは、引数の文字列を部分テンプレートの名前だと解釈する。
assets:precompileタスクの実行で、
config/environments/production.rbの、
config.serve_static_assets = true
をtrueにするのですが、それと
config.assets.compile = true
ここの編集しておかないと、
$ assets:precompile
の際にassets pipelineのスタイルが適用されない。
データベースの名前の変更
app/models/モデル名.rb
の中で、
self.table_name = 'テーブル名'
alias_attribute :新しいカラム名, :変えたいカラム名
とすると変える事ができる。