Skip to content

Commit 6768d86

Browse files
committed
v1.1.0
1 parent 28d8c81 commit 6768d86

File tree

4 files changed

+30
-2
lines changed

4 files changed

+30
-2
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## v1.1.0
2+
3+
- Features:
4+
- Added `slug` filter with option to apply the value on other field.
5+
16
## v1.0.1
27

38
- Fixes:

Gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
normalizy (1.0.1)
4+
normalizy (1.1.0)
55
rails (>= 4.1, < 6)
66

77
GEM

README.md

+23
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,29 @@ normalizy :amount, with: { percent: { cast: :to_f, type: :integer } }
343343
# 4200.0
344344
```
345345

346+
### Slug
347+
348+
Convert texto to slug.
349+
350+
```ruby
351+
normalizy :slug, with: :slug
352+
'Washington é Botelho'
353+
# 'washington-e-botelho'
354+
```
355+
356+
#### to
357+
358+
You can slug a field based on other just sending the result value.
359+
360+
```ruby
361+
normalizy :title, with: { slug: { to: :slug } }
362+
363+
model.title = 'Washington é Botelho'
364+
365+
model.slug
366+
# 'washington-e-botelho'
367+
```
368+
346369
### Strip
347370

348371
Cleans edge spaces.

lib/normalizy/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module Normalizy
4-
VERSION = '1.0.1'
4+
VERSION = '1.1.0'
55
end

0 commit comments

Comments
 (0)