Class: SummerResidents::ResidentsController
- Inherits:
-
FamilyForeignKeysController
- Object
- ApplicationController
- SummerResidentsController
- FamilyForeignKeysController
- SummerResidents::ResidentsController
- Defined in:
- app/controllers/summer_residents/residents_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
-
#update ⇒ Object
PUT /residents/1 PUT /residents/1.json.
Methods inherited from FamilyForeignKeysController
Instance Method Details
#create ⇒ Object
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 |
#update ⇒ Object
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 |