new archive

This commit is contained in:
unknown 2012-04-13 15:24:19 +08:00 committed by Christophe Vilayphiou
parent cdb8d6c755
commit d5cc470e5d
2 changed files with 5 additions and 5 deletions

View File

@ -4,7 +4,7 @@ class ArchiveFile
include Mongoid::Document include Mongoid::Document
include Mongoid::Timestamps include Mongoid::Timestamps
include Mongoid::MultiParameterAttributes include Mongoid::MultiParameterAttributes
PAYMENT_TYPES = @site_valid_locales PAYMENT_TYPES = @site_valid_locales
has_one :title, :class_name => "I18nVariable", :as => :language_value, :autosave => true, :dependent => :destroy 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 field :is_hidden, :type => Boolean, :default => false
belongs_to :archive_file_category belongs_to :archive_file_category
has_many :archive_file_multiples, :autosave => true, :dependent => :destroy has_many :archive_file_multiples, :autosave => true, :dependent => :destroy
accepts_nested_attributes_for :archive_file_multiples, :allow_destroy => true accepts_nested_attributes_for :archive_file_multiples, :allow_destroy => true
@ -31,7 +31,7 @@ class ArchiveFile
def self.search( category_id = nil ) def self.search( category_id = nil )
if category_id.to_s.size > 0 if category_id.to_s.size > 0
find(:all, :conditions => {archive_file_category_id: category_id}).desc( :is_top, :title ) find(:all, :conditions => {archive_file_category_id: category_id}).desc( :is_top, :title )
else else

View File

@ -70,7 +70,7 @@
<% end %> <% end %>
</div> </div>
<div> <div>
@ -114,7 +114,7 @@
</div> </div>
<!--Post End--> <!--Post End-->