Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This pull request is on deck for slugger. It's a baseball pun. Now you have to pull it. #7

Closed
wants to merge 2 commits into from

Conversation

danott
Copy link

@danott danott commented Jun 29, 2012

Explanations are in the two commits. Cool.

Validating the uniqueness of scoped slugs was not working if the title_column was not being explicitly stated. This change allows the :scope option to be used when inheriting the default settings for title_column.

`has_slug 'title', :scope => :association`

...can now be simplified to...

`has_slug, :scope => :association`
When building RESTful resources, sometimes we want to use a slug instead of an id. This convenience method will allow us to continue using default resources in our routes and controllers, replacing find_by_id calls with find_by_id_or_slug calls.
@danott danott closed this Oct 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant