Add custom validator and fix .html_safe with rescue

This commit is contained in:
Christophe Vilayphiou committed 2012-07-31 14:25:46 +08:00
1 parent ecb75fd085
commit 9f859b903d
16 files changed
+32 -16

No files matched your search

+4 -1
View File
@@ -9,7 +9,10 @@ class Asset
field :description, localize: true
field :title, localize: true
validates_presence_of :title, :data, :description
validates :title, :at_least_one => true
validates :description, :at_least_one => true
validates_presence_of :data
belongs_to :asset_category
belongs_to :assetable, polymorphic: true