aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/blog_category.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/blog_category.rb')
-rw-r--r--app/models/blog_category.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/models/blog_category.rb b/app/models/blog_category.rb
new file mode 100644
index 0000000..9060d11
--- /dev/null
+++ b/app/models/blog_category.rb
@@ -0,0 +1,10 @@
+class BlogCategory < ActiveRecord::Base
+
+ acts_as_indexed :fields => [:title]
+
+ validates_presence_of :title
+ validates_uniqueness_of :title
+
+ has_friendly_id :title, :use_slug => true
+
+end