Add custom validator and fix .html_safe with rescue
This commit is contained in:
1 parent
ecb75fd085
commit
9f859b903d
16 files changed
+32
-16
No files matched your search
+4
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user