Skip to content

Commit c89ec70

Browse files
committedJan 11, 2018
update styling and readability of readme
1 parent f7cfbb8 commit c89ec70

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
 

‎README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ gem "sprig"
1616
```
1717
Use `rails generate sprig:install` to create environment-specific and shared seed directories.
1818

19-
##The Sprig Directive
19+
## The Sprig Directive
2020

2121
Within your seed file, you can use the `sprig` directive to initiate Sprig's dark magicks. A simple directive might look like this.
2222

@@ -33,11 +33,11 @@ sprig_shared [User, Post, Comment]
3333

3434
This directive tells Sprig to go find your datafiles for the `User`, `Post`, and `Comment` seed resources, build records from the data entries, and insert them into the database. Sprig will automatically detect known datafile types like `.yml`, `.json`, or `.csv` within your environment-specific seed directory.
3535

36-
##Environment
36+
## Environment
3737

3838
Seed files are unique to the environment in which your Rails application is running. Within `db/seeds` create an environment-specific directory (i.e. `/development` for your 'development' environment).
3939

40-
###Shared
40+
### Shared
4141

4242
Shared seed files default directory is `shared` (eg `db/seeds/shared`)
4343
You can change it by settings`
@@ -49,7 +49,7 @@ sprig_shared [User]
4949
```
5050
This will insert `:env/users` and `shared/users` seeds
5151

52-
##Seed files
52+
## Seed files
5353

5454
Hang your seed definitions on a `records` key for *yaml* and *json* files.
5555

@@ -159,7 +159,7 @@ records:
159159
published_at: "<%= 1.week.ago %>"
160160
```
161161

162-
##Custom Sources and Parsers
162+
## Custom Sources and Parsers
163163

164164
If all your data is in `.wat` files, fear not. You can tell Sprig where to look for your data, and point it toward a custom parser class for turning your data into records. The example below tells Sprig to read `User` seed data from a Google Spreadsheet, and parse it accordingly.
165165

@@ -179,7 +179,7 @@ sprig [
179179
]
180180
```
181181

182-
##Configuration
182+
## Configuration
183183

184184
When Sprig conventions don't suit, just add a configuration block to your seed file.
185185

0 commit comments

Comments
 (0)