Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
commit
b771cc0fe1
@ -1,3 +1,5 @@
|
||||
$("#resources_list").html('<%= escape_javascript( render :partial => 'resources_list' ,:locals=>{ :attachments => @attachments})%>');
|
||||
$("#pages").html('<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
||||
$("#res_all_count").html(<%= @atta_count%>);
|
||||
$("#res_count").html(0);
|
||||
$("#checkboxAll").attr('checked',false);
|
@ -0,0 +1,25 @@
|
||||
class ForgeActivituesDate < ActiveRecord::Migration
|
||||
def up
|
||||
forge_count = ForgeActivity.all.count / 30 + 2
|
||||
transaction do
|
||||
for i in 1 ... forge_count do i
|
||||
ForgeActivity.page(i).per(30).each do |activity|
|
||||
unless activity.forge_act_type == "ProjectCreateInfo"
|
||||
if activity.forge_act
|
||||
unless activity.forge_act.project
|
||||
# puts activity.id
|
||||
activity.destroy
|
||||
end
|
||||
else
|
||||
# puts activity.id.to_s + "----"
|
||||
activity.destroy
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
@ -0,0 +1,15 @@
|
||||
class DeleteAnonymousJour < ActiveRecord::Migration
|
||||
def up
|
||||
jour_count = Journal.all.count / 30 + 2
|
||||
transaction do
|
||||
for i in 1 ... jour_count do i
|
||||
Journal.page(i).per(30).each do |jour|
|
||||
jour.destroy if jour.user_id == 2
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
Loading…
Reference in new issue