aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorPhilip Arndt <parndt@gmail.com>2011-04-02 12:10:59 +1300
committerPhilip Arndt <parndt@gmail.com>2011-04-02 12:10:59 +1300
commit5e00a69f8a2e33fb5cd4f871fbdf366ca6682995 (patch)
treeeba82b3b5c70fbc7b8876052a5ec1441c89dd612 /app
parent0d76f30fa384586e6ca18913c0604f4fb9db25aa (diff)
downloadrefinerycms-blog-5e00a69f8a2e33fb5cd4f871fbdf366ca6682995.tar.gz
refinerycms-blog-5e00a69f8a2e33fb5cd4f871fbdf366ca6682995.tar.bz2
refinerycms-blog-5e00a69f8a2e33fb5cd4f871fbdf366ca6682995.zip
Added friendly_id to categories so instead of /categories/1 we get, say, /categories/news
Diffstat (limited to 'app')
-rw-r--r--app/models/categorization.rb4
1 files changed, 4 insertions, 0 deletions
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