Add slug_title
This commit is contained in:
parent
3badd2a910
commit
dd3d366ec7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue