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.
11 lines
409 B
11 lines
409 B
class PollAnswer < ApplicationRecord
|
|
# default_scope :order => 'answer_position'
|
|
# include Redmine::SafeAttributes
|
|
|
|
belongs_to :poll_question
|
|
has_many :poll_votes, :dependent => :destroy
|
|
|
|
scope :find_answer_by_custom, lambda {|k,v| where("#{k}":v)} #根据传入的参数查找问题
|
|
scope :left_answer_choose, lambda {|k,v| where("#{k} > ?",v)} #根据传入的参数查找问题
|
|
|
|
end |