You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pgfqe6ch8/app/models/cooperation.rb

57 lines
1.4 KiB

#coding=utf-8
class Cooperation < ActiveRecord::Base
attr_accessible :mail, :name, :qq, :user_type
# def contact_us_title
# case user_type
# when '1'
# "高校合作"
# when '2'
# '企业合作'
# when '3'
# '实训投稿'
# when '4'
# '其他'
# end
# end
#
# def contact_us_name
# case user_type
# when '1'
# Cooperation.where(:user_type => '1').map(&:name)
# when '2'
# Cooperation.where(:user_type => '2').map(&:name)
# when '3'
# Cooperation.where(:user_type => '3').map(&:name)
# when '4'
# Cooperation.where(:user_type => '4').map(&:name)
# end
# end
#
# def contact_us_qq
# case user_type
# when '1'
# Cooperation.where(:user_type => '1').map(&:qq)
# when '2'
# Cooperation.where(:user_type => '2').map(&:qq)
# when '3'
# Cooperation.where(:user_type => '3').map(&:qq)
# when '4'
# Cooperation.where(:user_type => '4').map(&:qq)
# end
# end
#
# def contact_us_mail
# case user_type
# when '1'
# Cooperation.where(:user_type => '1').map(&:mail)
# when '2'
# Cooperation.where(:user_type => '2').map(&:mail)
# when '3'
# Cooperation.where(:user_type => '3').map(&:mail)
# when '4'
# Cooperation.where(:user_type => '4').map(&:mail)
# end
# end
end