Class: Socializer::PersonEmploymentsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/socializer/person_employments_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



5
6
7
8
9
# File 'app/controllers/socializer/person_employments_controller.rb', line 5

def create
  @person_employment = current_user.adresses.build(params[:person_employment])
  @person_employment.save!
  redirect_to current_user
end

#destroyObject



16
17
18
19
# File 'app/controllers/socializer/person_employments_controller.rb', line 16

def destroy
  @person_employment.destroy
  redirect_to current_user
end

#updateObject



11
12
13
14
# File 'app/controllers/socializer/person_employments_controller.rb', line 11

def update
  @person_employment.update!(params[:person_employment])
  redirect_to current_user
end