Skip to content

Commit

Permalink
Add info on user-controlled slugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
norman committed Sep 22, 2010
1 parent c75b80d commit d829873
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Changelog.md
Expand Up @@ -6,7 +6,7 @@ suggestions, ideas and improvements to FriendlyId.
* Table of Contents
{:toc}

## 3.1.7 (NOT RELEASED YET)
## 3.1.7 (2010-09-22)

* Reserved words can now be regular expressions.
* Fix broken SQL when finding with a nil scope on AR3 (Tony Primerano)
Expand Down
8 changes: 8 additions & 0 deletions Guide.md
Expand Up @@ -517,6 +517,14 @@ slugs older than 45 days.

# Misc tips

## Allowing Users to Override/Control Slugs

Would you like to mostly use default slugs, but allow the option of a
custom user-chosen slug in your application? If so, then you're not the first to
want this. Here's a [demo
application](http://github.com/norman/friendly_id_manual_slug_demo) showing how
it can be done.

## Default Scopes

Whether you're using FriendlyId or not, a good rule of thumb for default scopes
Expand Down
1 change: 1 addition & 0 deletions Rakefile
Expand Up @@ -41,6 +41,7 @@ namespace :test do
Rake::TestTask.new(:friendly_id) { |t| t.pattern = "test/*_test.rb" }
Rake::TestTask.new(:ar) { |t| t.pattern = "test/active_record_adapter/*_test.rb" }

desc "Test against lots of versions"
task :pre_release do
["ree-1.8.7-2010.02", "ruby-1.9.2-p0"].each do |ruby|
["sqlite3", "mysql", "postgres"].each do |driver|
Expand Down
2 changes: 1 addition & 1 deletion lib/friendly_id/version.rb
Expand Up @@ -3,7 +3,7 @@ module Version
MAJOR = 3
MINOR = 1
TINY = 7
BUILD = 'pre'
BUILD = nil
STRING = [MAJOR, MINOR, TINY, BUILD].compact.join('.')
end
end

0 comments on commit d829873

Please sign in to comment.