# -*coding:utf-8 -*-
desc "First Page Initialize"
task :first_page do
puts "first_page sync."
end
namespace :first_page do
desc "initialize first page"
task :initialize => :environment do
first_page = FirstPage.where("page_type = 'project'").first
first_page.description = "
micROS多态智能集群机器人操作系统
中国开源社区
"
first_page.image_width = 107;
first_page.image_height = 63;
course_page = FirstPage.where("page_type = 'course'").first
course_page.image_width = 75
course_page.image_height = 75
contest_page = FirstPage.where("page_type = 'contest'").first
contest_page.image_width = 75
contest_page.image_height = 75
first_page.save
course_page.save
contest_page.save
puts "initialized Successfully"
end
end