Class: Refinery::RaceRegistrations::Admin::PeopleController
- Inherits:
-
AdminController
- Object
- AdminController
- Refinery::RaceRegistrations::Admin::PeopleController
show all
- Includes:
- PeopleHelper
- Defined in:
- app/controllers/refinery/race_registrations/admin/people_controller.rb
Instance Method Summary
collapse
#sort_column, #sort_direction, #sortable
Instance Method Details
#create ⇒ Object
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'app/controllers/refinery/race_registrations/admin/people_controller.rb', line 20
def create
@categories = Category.all
@person = Person.new(person_params)
@person.bypass_humanizer = true
if @person.save
flash.notice = t(
'refinery.crudify.created',
:what => @person.surname
)
find_all_people
render :edit
else
render :action => 'new'
end
end
|
#edit ⇒ Object
41
42
43
44
|
# File 'app/controllers/refinery/race_registrations/admin/people_controller.rb', line 41
def edit
@categories = Registration.find(@person.registration_id).categories
end
|
#new ⇒ Object
15
16
17
18
|
# File 'app/controllers/refinery/race_registrations/admin/people_controller.rb', line 15
def new
@person = Person.new
@categories = Category.all
end
|