class Poll < ActiveRecord::Base #attr_accessible :closed_at, :polls_group_id, :polls_name, :polls_status, :polls_type, :published_at, :user_id include Redmine::SafeAttributes belongs_to :user has_many :poll_questions, :dependent => :destroy has_many :poll_users, :dependent => :destroy has_many :users, :through => :poll_users #该文件被哪些用户提交答案过 end