移动关卡报错

issues25489
daiao 5 years ago
parent c1dac659a2
commit 934a6069f0

@ -7,11 +7,11 @@ class Inform < ApplicationRecord
has_many :attachments, as: :container, dependent: :destroy
def next_inform
Inform.where(position: self.position+1, container_id: self.container_id, container_type: self.container_type)
Inform.find_by(position: self.position+1, container_id: self.container_id, container_type: self.container_type)
end
def last_inform
Inform.where(position: self.position-1, container_id: self.container_id, container_type: self.container_type)
Inform.find_by(position: self.position-1, container_id: self.container_id, container_type: self.container_type)
end
end

Loading…
Cancel
Save