RI
Size: a a a
RI
RI
RU
BO
ŹR
BO
AI
AI
В
D
AK
AK
VY
AI
AI
AI
AI
A
attr_accessor :has_tdrПочему виртуального аттрибута нет в модели?
after_update :has_tdr?
def has_tdr?
attr = self.attribute_names.select{|a| a.include?("not_rated")}
output = "No"
attr.each do |a|
if !self[a].nil?
output = "Yes"
break
else
next
end
end
self.update_column(:has_tdr, output)
end