lib/video.rb in ish_models-0.0.33.18 vs lib/video.rb in ish_models-0.0.33.19

- old
+ new

@@ -30,10 +30,10 @@ has_many :newsitems accepts_nested_attributes_for :site, :tag, :city def self.list - [['', nil]] + Video.all.order_by( :name => :desc ).map { |item| [ item.name, item.id ] } + [['', nil]] + Video.all.order_by( :created_at => :desc ).map { |item| [ "#{item.created_at.strftime('%Y%m%d')} #{item.name}", item.id ] } end set_callback( :create, :before ) do |doc| if doc.is_public doc.city.add_newsitem( doc ) unless doc.city.blank?