Sha256: dd3dea063e63be06ef96d48445a4553c41357ca46d07bb8ea8de10f130adf900
Contents?: true
Size: 279 Bytes
Versions: 1
Compression:
Stored size: 279 Bytes
Contents
module Bloggybak class Post < ActiveRecord::Base belongs_to :user validates_presence_of :title validates_presence_of :slug validates_presence_of :user_id def excerpt(length) self.content.gsub(/<\/?[^>]*>/, "")[0..length-1] + '...' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bloggybak-0.1.2 | app/models/bloggybak/post.rb |