From 5e00a69f8a2e33fb5cd4f871fbdf366ca6682995 Mon Sep 17 00:00:00 2001 From: Philip Arndt Date: Sat, 2 Apr 2011 12:10:59 +1300 Subject: Added friendly_id to categories so instead of /categories/1 we get, say, /categories/news --- app/models/categorization.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app') diff --git a/app/models/categorization.rb b/app/models/categorization.rb index 32e9967..20821d4 100644 --- a/app/models/categorization.rb +++ b/app/models/categorization.rb @@ -1,5 +1,9 @@ class Categorization < ActiveRecord::Base + set_table_name 'blog_categories_blog_posts' belongs_to :blog_post belongs_to :blog_category + + has_friendly_id :title, :use_slug => true + end \ No newline at end of file -- cgit v1.2.3