new archive
This commit is contained in:
parent
cdb8d6c755
commit
d5cc470e5d
|
@ -4,7 +4,7 @@ class ArchiveFile
|
|||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
include Mongoid::MultiParameterAttributes
|
||||
|
||||
|
||||
PAYMENT_TYPES = @site_valid_locales
|
||||
|
||||
has_one :title, :class_name => "I18nVariable", :as => :language_value, :autosave => true, :dependent => :destroy
|
||||
|
@ -19,7 +19,7 @@ class ArchiveFile
|
|||
field :is_hidden, :type => Boolean, :default => false
|
||||
|
||||
belongs_to :archive_file_category
|
||||
|
||||
|
||||
has_many :archive_file_multiples, :autosave => true, :dependent => :destroy
|
||||
|
||||
accepts_nested_attributes_for :archive_file_multiples, :allow_destroy => true
|
||||
|
@ -31,7 +31,7 @@ class ArchiveFile
|
|||
def self.search( category_id = nil )
|
||||
|
||||
if category_id.to_s.size > 0
|
||||
|
||||
|
||||
find(:all, :conditions => {archive_file_category_id: category_id}).desc( :is_top, :title )
|
||||
|
||||
else
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
<% end %>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div>
|
||||
|
@ -114,7 +114,7 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!--Post End-->
|
||||
|
|
Loading…
Reference in New Issue