Skip to content

Commit

Permalink
v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wbotelhos committed Dec 29, 2017
1 parent 28d8c81 commit 6768d86
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## v1.1.0

- Features:
- Added `slug` filter with option to apply the value on other field.

## v1.0.1

- Fixes:
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
normalizy (1.0.1)
normalizy (1.1.0)
rails (>= 4.1, < 6)

GEM
Expand Down
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,29 @@ normalizy :amount, with: { percent: { cast: :to_f, type: :integer } }
# 4200.0
```

### Slug

Convert texto to slug.

```ruby
normalizy :slug, with: :slug
'Washington é Botelho'
# 'washington-e-botelho'
```

#### to

You can slug a field based on other just sending the result value.

```ruby
normalizy :title, with: { slug: { to: :slug } }
model.title = 'Washington é Botelho'
model.slug
# 'washington-e-botelho'
```

### Strip

Cleans edge spaces.
Expand Down
2 changes: 1 addition & 1 deletion lib/normalizy/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Normalizy
VERSION = '1.0.1'
VERSION = '1.1.0'
end

0 comments on commit 6768d86

Please sign in to comment.