Class: Workgroup
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Workgroup
- 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
- #frontend_link ⇒ Object
- #notif_pending_join_request(requestor) ⇒ Object
- #notif_pending_join_request_approved(requestor) ⇒ Object
Methods included from Utils
#obj_type, #reindex, #sanitize, #sanitize_content, #sanitize_description
Methods included from Skillable
Methods included from Ressourceable
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
Methods included from Geocodable
Methods included from Feedable
Methods included from Coordinates
Methods included from Bannerable
Methods included from AffiliatableChild
#add_affiliation_to, #remove_affiliation_to
Instance Method Details
#frontend_link ⇒ Object
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 |