好友关注、关注人数
def visitnos#好友关注
seeme=Seemefriends.find(:last,:conditions=>"from_user_id=#{session[:user].id} and to_user_id=#{self.id}")
if seeme
seeme.update_attributes (:created_at=>Time.now)
else
seeme=Seemefriends.new
seeme.from_user_id=session[:user].id
seeme.to_user_id=self.id
seeme.save
self.visitno=self.visitno+1
self.save
end
end