Asset upload
This commit is contained in:
1 parent
9129835f23
commit
26292f0dcc
15 files changed
+191
-43
No files matched your search
@@ -8,9 +8,16 @@ class Asset
|
||||
field :filename
|
||||
field :description
|
||||
|
||||
has_one :i18n_variable, :as => :language_value, :autosave => true, :dependent => :destroy
|
||||
|
||||
validates_presence_of :filename, :data
|
||||
|
||||
belongs_to :asset_category
|
||||
belongs_to :assetable, polymorphic: true
|
||||
has_and_belongs_to_many :tags, :class_name => "AssetTag"
|
||||
|
||||
def sorted_tags
|
||||
tags.order_by(I18n.locale, :asc)
|
||||
end
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user