Method: SubscriptionClientNotice.expire_all
- Defined in:
- app/models/subscription_client_notice.rb
.expire_all(notice_type, notice_subject_type, notice_subject_id) ⇒ Object
190 191 192 193 194 195 196 197 |
# File 'app/models/subscription_client_notice.rb', line 190 def self.expire_all(notice_type, notice_subject_type, notice_subject_id) where(" notice_type = #{notice_type} AND notice_subject_type = '#{notice_subject_type}' AND notice_subject_id = #{notice_subject_id} AND expired_at IS NULL ").update_all("expired_at = now()") end |