module Invitation::Invitable::InstanceMethods
Instance methods for invitables.
Public Instance Methods
add_invited_user(user)
click to toggle source
Add the invited user to the organization. Called by InvitesController.
# File lib/invitation/invitable.rb, line 40 def add_invited_user(user) method = Invitation.configuration.user_model.name.underscore.pluralize send(method).push(user) end
invitable_name()
click to toggle source
Get the name of the organization for use in invitations.
# File lib/invitation/invitable.rb, line 48 def invitable_name if invitable_options[:named_by] send(invitable_options[:named_by]) elsif invitable_options[:named] invitable_options[:named] else raise 'Invitation runtime error: invitable does not have name: or named_by: set, should not be possible! ' + inspect end end