Skip to content

Commit a736fcf

Browse files
authored
Merge pull request #66 from stewart/fix/add-credentials-to-readme
Flesh out installation instructions
2 parents 5cbfb5b + add07f9 commit a736fcf

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,37 @@ Installation
77
------------
88

99
Just add this line to your `Gemfile`:
10+
1011
```ruby
1112
gem "solidus_auth_devise"
1213
```
1314

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.
1528

1629
### Confirmable
1730

1831
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:
1932

2033
* Add this line to an initializer in your Rails project (typically `config/initializers/spree.rb`):
34+
2135
```ruby
2236
Spree::Auth::Config[:confirmable] = true
2337
```
2438

2539
* Add a Devise initializer to your Rails project (typically `config/initializers/devise.rb`):
40+
2641
```ruby
2742
Devise.setup do |config|
2843
# Required so users don't lose their carts when they need to confirm.
@@ -57,11 +72,13 @@ end
5772
```
5873

5974
Then register your class in your spree initializer: config/initializers/spree.rb
75+
6076
```ruby
6177
Spree::Ability.register_ability(SuperAbilities)
6278
```
6379

6480
Inside of your host application you can then use CanCan like you normally would.
81+
6582
```erb
6683
<% if can? :stop Bullet %>
6784
...

0 commit comments

Comments
 (0)