LoginSignup
7
6

More than 5 years have passed since last update.

Rails 4系からRails 5.0.0.beta1にアップデートした時に引っかかったこと

Posted at

自分が趣味で開発しているKPTBoardをRailsの4系からRailsの5.0.0.beta1にアップデートした時に引っかかった点で他のアプリでもアップデートする時にありそうなことを書きます。

deviseとcapybaraはgithubのmasterブランチから取得しないと動かなかった

gem 'devise', github: 'plataformatec/devise'
gem 'capybara', github: 'jnicklas/capybara'

belongs_toで指定しているものは、必須になる

class Label < ActiveRecord::Base
  belongs_to :user
end

validates :user

とかしてなくても必須になるようです。必須じゃない場合はoptionalで設定します。

class Label < ActiveRecord::Base
  belongs_to :user, optional: true
end

作業コミット

7
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
6