spree/spree — pull request #983 by ebeigarts (2012-01-17 14:44:46+00:00)
Title: Fix incorrect permalink increments

`Spree::Product.create` was executing a query with `permalink LIKE '%'` which caused incorrect permalink increment values to be assigned to products and wouldn't allow to create products with the same names.

```sql
SELECT `spree_products`.* FROM `spree_products` WHERE (permalink LIKE '%') ORDER BY permalink DESC LIMIT 1
```