Class: InvitationForms::Update
- Inherits:
-
SimpleTeams::InvitationForm
- Object
- SimpleTeams::InvitationForm
- InvitationForms::Update
- Defined in:
- app/forms/simple_teams/invitation_forms/update.rb
Instance Method Summary collapse
-
#initialize(invitation, current_user) ⇒ Update
constructor
A new instance of Update.
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 |