Class: Workgroup

Inherits:
ApplicationRecord show all
Includes:
AffiliatableChild, AlgoliaSearch, Bannerable, Coordinates, Feedable, Geocodable, Interestable, Linkable, Mediumable, Membership, NotificationsHelpers, RelationHelpers, Ressourceable, Skillable, Utils
Defined in:
app/models/workgroup.rb

Instance Method Summary collapse

Methods included from Utils

#obj_type, #reindex, #sanitize, #sanitize_content, #sanitize_description

Methods included from Skillable

#update_skills

Methods included from Ressourceable

#update_ressources

Methods included from RelationHelpers

#clappers, #claps_count, #followers, #followers_count, #reviews_count, #saves_count

Methods included from NotificationsHelpers

#notif_new_follower, #notif_new_member, #notif_pending_member

Methods included from Membership

#admins, #all_owners_admins_members, #has_privacy?, #members, #members_count, #owners, #pending_members, #user_is_member?, #users, #users_sm

Methods included from Interestable

#update_interests

Methods included from Geocodable

#make_address

Methods included from Feedable

#posts_count

Methods included from Coordinates

#create_coordinates

Methods included from Bannerable

#banner_url, #banner_url_sm

Methods included from AffiliatableChild

#add_affiliation_to, #remove_affiliation_to

Instance Method Details



51
52
53
# File 'app/models/workgroup.rb', line 51

def frontend_link
  "/workgroup/#{id}"
end

#notif_pending_join_request(requestor) ⇒ Object



55
56
57
58
59
60
61
62
# File 'app/models/workgroup.rb', line 55

def notif_pending_join_request(requestor)
  Notification.create(
    target: requestor,
    category: :membership,
    type: 'pending_join_request',
    object: self
  )
end

#notif_pending_join_request_approved(requestor) ⇒ Object



64
65
66
67
68
69
70
71
# File 'app/models/workgroup.rb', line 64

def notif_pending_join_request_approved(requestor)
  Notification.create(
    target: requestor,
    category: :membership,
    type: 'pending_join_request_approved',
    object: self
  )
end