Class: SummerResidents::FamilyForeignKeysController
Instance Method Summary
collapse
Instance Method Details
#create ⇒ Object
16
17
18
19
20
|
# File 'app/controllers/summer_residents/family_foreign_keys_controller.rb', line 16
def create
create_and_assign_to_family
assign_attributes
show_unless_errors
end
|
#destroy ⇒ Object
28
29
30
31
32
33
34
|
# File 'app/controllers/summer_residents/family_foreign_keys_controller.rb', line 28
def destroy
model_name.find(params[:id]).destroy
respond_to do |format|
format.js { render nothing: true }
end
end
|
#edit ⇒ Object
11
12
13
14
|
# File 'app/controllers/summer_residents/family_foreign_keys_controller.rb', line 11
def edit
@instance = model_name.find(params[:id])
edit_but_if_cancelled :show
end
|
#new ⇒ Object
6
7
8
9
|
# File 'app/controllers/summer_residents/family_foreign_keys_controller.rb', line 6
def new
create_and_assign_to_family
edit_but_if_cancelled :blank
end
|
#update ⇒ Object
22
23
24
25
26
|
# File 'app/controllers/summer_residents/family_foreign_keys_controller.rb', line 22
def update
@instance = model_name.find(params[:id])
assign_attributes
show_unless_errors
end
|