sellect / acts_as_permalink

Automatically manage permalink fields for ActiveRecord models in Rails.
MIT License
0 stars 0 forks source link

refactor and update rspec to 3 #4

Closed jGRUBBS closed 9 years ago

jGRUBBS commented 9 years ago

Improve readability

laptite commented 9 years ago

@jGRUBBS We've reverted projects to point to the acts_as_permalink master branch b/c Delpozo permalinks weren't incrementing.

Your acts_as_permalink branch has scope added to validates_uniqueness_of. In Delpozo, this has resulted in the permalinks not incrementing. On ET, we have a number of permalinks that we want scoped to parent_id.

We need to verify that permalinks increment as intended given the desired scenario.

laptite commented 9 years ago

@jGRUBBS This last commit includes our fix to check if the acts_as_paranoid :deleted_at column is present, and adding a condition to only check objects that have not been deleted. This address the above concern that permalinks weren't incrementing b/c of existing permalinks on deleted objects.