queries need to be rethink
This commit is contained in:
1 parent
caf0426bd4
commit
167a71272a
17 files changed
+50
-101
No files matched your search
+3
-6
@@ -2,6 +2,8 @@ class Asset
|
||||
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
include OrbitTag::Taggable
|
||||
taggable
|
||||
|
||||
mount_uploader :data, FileAssetUploader
|
||||
|
||||
@@ -16,15 +18,10 @@ class Asset
|
||||
|
||||
belongs_to :asset_category
|
||||
belongs_to :assetable, polymorphic: true
|
||||
has_and_belongs_to_many :tags, :class_name => "AssetTag"
|
||||
# has_and_belongs_to_many :tags, :class_name => "AssetTag"
|
||||
|
||||
before_save :clean_tags
|
||||
|
||||
def sorted_tags
|
||||
#tags.order_by(I18n.locale, :asc)
|
||||
tags
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def clean_tags
|
||||
|
||||
Reference in new issue
Block a user