FIX
This commit is contained in:
parent
f9a01ac7cc
commit
fb3eda8559
|
@ -4,10 +4,7 @@ class Home < ActiveRecord::Base
|
|||
has_one :cover, as: :coverable, dependent: :destroy
|
||||
has_many :banners, dependent: :destroy
|
||||
|
||||
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
|
||||
validates_presence_of :name, :content
|
||||
|
||||
def more_content?
|
||||
content.html_safe.length > Home::SHOW_CONTENT_LENGTH
|
||||
|
|
Loading…
Reference in New Issue