Skip to content

Commit

Permalink
fix: mongoid_slug:set rake task for Mongoid 5.
Browse files Browse the repository at this point in the history
  • Loading branch information
dblock committed Jun 8, 2016
1 parent 6f75f67 commit 79c5b6c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* [#166](https:/digitalplaywright/mongoid-slug/issues/166): Configure slug builder globally - [@anujaware](https:/anujaware).
* [#209](https:/digitalplaywright/mongoid-slug/issues/209): Prefixed internal `Mongoid::Slug` class attributes with `slug_` to avoid conflicts - [@dblock](https:/dblock).
* [#217](https:/digitalplaywright/mongoid-slug/issues/217): Fixed `mongoid_slug:set` rake task for Mongoid 5 - [@dblock](https:/dblock).
* Your contribution here.

## 5.2.0 (2016/01/03)
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/mongoid_slug.rake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace :mongoid_slug do
klasses = (klasses.map(&:to_s) & models.map(&:classify)).map(&:constantize) if models.any?
klasses.each do |klass|
# set slug for objects having blank slug
klass.each { |object| object.set_slug! unless object.slugs? }
klass.each { |object| object.set_slug! unless object.slugs? && object.slugs.any? }
end
end
end
Expand Down

0 comments on commit 79c5b6c

Please sign in to comment.