Class: Feed
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Feed
- Defined in:
- app/models/feed.rb
Instance Method Summary collapse
- #notif_admins_about_new_post(post) ⇒ Object
- #notif_new_post_in_feed(post, feed_host) ⇒ Object
- #update_activity(_args) ⇒ Object
Instance Method Details
#notif_admins_about_new_post(post) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'app/models/feed.rb', line 22 def notif_admins_about_new_post(post) Notification.for_group( :admins_minus_poster, args: [feedable, post], attrs: { category: :feed, type: 'new_post_admin_notify', object: post } ) end |
#notif_new_post_in_feed(post, feed_host) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/models/feed.rb', line 10 def notif_new_post_in_feed(post, feed_host) Notification.for_group( :feed_host_followers_minus_post_author, args: [post, feed_host], attrs: { category: :feed, type: 'new_post', object: post } ) end |
#update_activity(_args) ⇒ Object
34 35 36 |
# File 'app/models/feed.rb', line 34 def update_activity(_args) feedable.updated_at = Time.now end |