Class: Refinery::RaceRegistrations::PeopleController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Refinery::RaceRegistrations::PeopleController
- Defined in:
- app/controllers/refinery/race_registrations/people_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/controllers/refinery/race_registrations/people_controller.rb', line 14 def create @person = Person.new(person_params) if @person.save redirect_to refinery.race_registrations_registration_path(:id=> @person.registration_id) , :notice => t('refinery.crudify.created', :what => @person.name + " " + @person.surname ) else @registrations = Registration.published @categories = @registrations.first.try(:categories) render :action=> "new" end end |
#new ⇒ Object
6 7 8 9 10 11 12 |
# File 'app/controllers/refinery/race_registrations/people_controller.rb', line 6 def new @person = Person.new @registrations = Registration.published @categories = @registrations.first.try(:categories) present(@page) end |