Class: PhonesController

Inherits:
ArtfullyOseController show all
Defined in:
app/controllers/phones_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



4
5
6
7
# File 'app/controllers/phones_controller.rb', line 4

def create
  @person.phones.create(params[:phone])
  redirect_to @person
end

#destroyObject



9
10
11
12
# File 'app/controllers/phones_controller.rb', line 9

def destroy
  Phone.destroy(params[:id])
  redirect_to person_url(@person)
end