This commit is contained in:
caishi 2019-10-16 17:42:53 +08:00
commit a2757b440a
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ class Home < ActiveRecord::Base
validates_presence_of :name, :content, :frendly_id
validates_format_of :friendly_id, :with => /\A[a-z0-9\-]+\z/
before_validation :generate_friendly_id, :on => :create
# before_validation :generate_friendly_id, :on => :create
def more_content?
content.html_safe.length > Home::SHOW_CONTENT_LENGTH