Class: SummerResidents::ResidentsController

Inherits:
FamilyForeignKeysController show all
Defined in:
app/controllers/summer_residents/residents_controller.rb

Instance Method Summary collapse

Methods inherited from FamilyForeignKeysController

#destroy, #edit, #new

Instance Method Details

#createObject



8
9
10
11
12
13
14
# File 'app/controllers/summer_residents/residents_controller.rb', line 8

def create
  create_and_assign_to_family
  assign_attributes
  @instance.user = User.initialize_without_password(email_param)
  EasyRailsAuthentication::AuthenticationHelper.SendPasswordInitializationEmailTo @instance.email if @instance.save
  show_unless_errors
end

#updateObject

PUT /residents/1 PUT /residents/1.json



18
19
20
21
22
23
# File 'app/controllers/summer_residents/residents_controller.rb', line 18

def update
  @instance = Resident.find(params[:id])
  assign_attributes
  @instance.user.email = email_param
  show_unless_errors
end