Skip to content

Commit 71cacb9

Browse files
committed
Doc about lowercase parameter
1 parent a9d9b52 commit 71cacb9

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Post.create({
5151
content: 'Post content'
5252
})
5353
.then(function(post) {
54-
console.log(post.slug); // 'This-is-a-new-post'
54+
console.log(post.slug); // 'this-is-a-new-post'
5555
});
5656
```
5757

@@ -63,14 +63,14 @@ Post.create({
6363
content: 'A new post again'
6464
})
6565
.then(function(post) {
66-
console.log(post.slug); // 'This-is-a-new-posta50ec97e-9ae1-44a5-8fb2-81c665b61538'
66+
console.log(post.slug); // 'this-is-a-new-posta50ec97e-9ae1-44a5-8fb2-81c665b61538'
6767
});
6868
```
6969

7070
Like any other attribute, you can use dynamic finders:
7171

7272
```js
73-
Post.findOneBySlug('This-is-a-new-post')
73+
Post.findOneBySlug('this-is-a-new-post')
7474
.then(function(post) {
7575
// Use the post
7676
})
@@ -79,6 +79,14 @@ Post.findOneBySlug('This-is-a-new-post')
7979
});
8080
```
8181

82+
## Configuration
83+
84+
These parameters can be changed in `sails.config.slugs`:
85+
86+
Parameter | Type | Details
87+
-------------- | ------------------- |:---------------------------------
88+
lowercase | `boolean` | Whether or not the generated slugs are lowercased. Defaults to `true`.
89+
8290
## License
8391

8492
MIT © 2015 Jérémie Ledentu

0 commit comments

Comments
 (0)