LoginSignup
7
8

More than 5 years have passed since last update.

Mongoid で devise を使う

Last updated at Posted at 2013-08-18

Gemfile を修正

gem 'devise'
gem 'mongoid'
# rails4 を使う場合は以下
# gem 'mongoid',  git: 'https://github.com/mongoid/mongoid.git'

この状態で rails g devise:install を実行すると、Devise は mongoid を使うようになっている。

あとから mongoid を追加した場合は、config/initializers/devise.rb を修正して、mongoid を使うようにする必要がある。

    #require 'devise/orm/active_record'
    require 'devise/orm/mongoid'
7
8
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
8