You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,22 +7,37 @@ Installation
7
7
------------
8
8
9
9
Just add this line to your `Gemfile`:
10
+
10
11
```ruby
11
12
gem "solidus_auth_devise"
12
13
```
13
14
14
-
Then run `bundle install`.
15
+
Then, run `bundle install`.
16
+
17
+
After that's done, you can install and run the necessary migrations, then seed the database:
18
+
19
+
```shell
20
+
bundle exec rake solidus_auth:install:migration
21
+
bundle exec rake db:migrate
22
+
bundle exec rake db:seed
23
+
```
24
+
25
+
### Default Username/Password
26
+
27
+
As part of running the above installation steps, you will be asked to set an admin email/password combination. The default values are `admin@example.com` and `test123`, respectively.
15
28
16
29
### Confirmable
17
30
18
31
To enable Devise's Confirmable module, which will send the user an email with a link to confirm their account, you must do the following:
19
32
20
33
* Add this line to an initializer in your Rails project (typically `config/initializers/spree.rb`):
34
+
21
35
```ruby
22
36
Spree::Auth::Config[:confirmable] =true
23
37
```
24
38
25
39
* Add a Devise initializer to your Rails project (typically `config/initializers/devise.rb`):
40
+
26
41
```ruby
27
42
Devise.setup do |config|
28
43
# Required so users don't lose their carts when they need to confirm.
@@ -57,11 +72,13 @@ end
57
72
```
58
73
59
74
Then register your class in your spree initializer: config/initializers/spree.rb
75
+
60
76
```ruby
61
77
Spree::Ability.register_ability(SuperAbilities)
62
78
```
63
79
64
80
Inside of your host application you can then use CanCan like you normally would.
0 commit comments