Class: InvitationForms::Update

Inherits:
SimpleTeams::InvitationForm
  • Object
show all
Defined in:
app/forms/simple_teams/invitation_forms/update.rb

Instance Method Summary collapse

Constructor Details

#initialize(invitation, current_user) ⇒ Update

Returns a new instance of Update.



4
5
6
7
8
9
10
11
12
13
# File 'app/forms/simple_teams/invitation_forms/update.rb', line 4

def initialize(invitation, current_user)
  @invitation = invitation
  @team = @invitation.team
  @current_user = current_user

  # Get existing attributes
  self.class.invitation_attributes.each do |a|
    self.assign_attributes(a => @invitation.send(a))
  end
end