@@ -10,11 +10,16 @@ For more on Mongoid support in ActiveAdmin see [this issue](https://github.com/g
10
10
11
11
## Installation
12
12
13
- Add this line to your application's Gemfile:
13
+ ### Some Gems
14
+ Add the following gems to your application's Gemfile:
14
15
15
16
``` ruby
16
17
gem ' activeadmin-mongoid'
18
+ gem ' devise'
17
19
```
20
+ Devise is the gem used to managed admin authentication.
21
+ The gem is required to force itself ORM configuration.
22
+ Else the gem will try to use by default ActiveRecord ORM.
18
23
19
24
You can safely remove the following lines, since are already activeadmin-mongoid dependencies:
20
25
@@ -24,10 +29,40 @@ gem 'meta_search', '>= 1.1.0.pre'
24
29
gem ' sass-rails' , [' ~> 3.1' , ' >= 3.1.4' ]
25
30
```
26
31
27
- And then execute:
32
+ ### Remove Application Dependencies
33
+ In your config/application.rb, replace :
34
+
35
+ ``` ruby
36
+ require ' rails/all'
37
+ ```
38
+
39
+ with :
40
+
41
+ ``` ruby
42
+ require " action_controller/railtie"
43
+ require " action_mailer/railtie"
44
+ require " active_resource/railtie"
45
+ require " sprockets/railtie"
46
+ require " rails/test_unit/railtie"
47
+ ```
48
+
49
+ rails/all includes elements requiring ActiveRecord::Connection ...
50
+
51
+ ### Bundle & Crank
52
+
53
+ Execute:
28
54
29
55
$ bundle
56
+ $ rails g devise:install
57
+
58
+ Check that the generated initializers/devise.rb file requires mongoid orm.
59
+ You may find a line like this :
60
+
61
+ ``` ruby
62
+ require ' devise/orm/mongoid'
63
+ ```
30
64
65
+ And that's pretty much it !
31
66
32
67
## Contributing
33
68
0 commit comments