From dd3d366ec7021828fc8042a2199bb74570be0c73 Mon Sep 17 00:00:00 2001 From: manson Date: Fri, 11 Apr 2014 17:20:07 +0800 Subject: [PATCH] Add slug_title --- app/models/bulletin.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/models/bulletin.rb b/app/models/bulletin.rb index 7addada..b541ed1 100644 --- a/app/models/bulletin.rb +++ b/app/models/bulletin.rb @@ -4,14 +4,10 @@ class Bulletin include OrbitCategory::Categorizable include Slug - field :title, type: String, localize: true + field :title, as: :slug_title, type: String, localize: true field :body, type: String, localize: true field :uid, type: String - def generate_slug - self.generate_slug(self.title, self.uid) - end - def self.find_by_param(input) self.find_by(uid: input) end