rubytij/usergroup — pull request #51 by EnriqueVidal (2012-09-16 09:54:11+00:00)
Title: Overall Improvements:

* Upgraded test gems
* Added pg_power
* Added quiet_assets on development
* Remove scoped uniqueness on Page#name

The case for: `Remove scoped uniqueness on Page#name`:

Currently we can navigate and create pages on sections with no problem however friendly_id default behavior is to use the `slugged` field as the id in the case of `Page` that would be `name`, this is totally fine for creating new pages, but it fails when editing, since we're not scoping by `section`, updating a page without changing the name, will trigger the uniqueness validation on `name`, this would be fine if we were sure we were trying to edit the right page, however... `simple_form_for` uses `[ :dashboard, page ]` and instead of doing a ` PUT` to `/dashboard/pages/1` it does a PUT to `/dashboard/pages/main`, the `before_filter` call on `Dashboard::PagesController` picks up that as the id and looks for the first page with that name not the actual id, this is prone to failure, since our uniqueness scope is no longer valid.

## TL;DR

This commit fixes the slugged field problem by not allowing the same name on pages.