Class: Refinery::RaceRegistrations::RegistrationsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Refinery::RaceRegistrations::RegistrationsController
- Defined in:
- app/controllers/refinery/race_registrations/registrations_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
14 15 16 17 |
# File 'app/controllers/refinery/race_registrations/registrations_controller.rb', line 14 def index @registration = Registration.first redirect_to refinery.race_registrations_registration_path(:id=> @registration) end |
#redirect ⇒ Object
8 9 10 11 12 |
# File 'app/controllers/refinery/race_registrations/registrations_controller.rb', line 8 def redirect if params[:registration][:id].present? redirect_to refinery.race_registrations_registration_path(params[:registration][:id]) end end |
#show ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'app/controllers/refinery/race_registrations/registrations_controller.rb', line 19 def show @registration = Registration.find(params[:id]) # you can use meta fields from your model instead (e.g. browser_title) # by swapping @page for @registration in the line below: present(@page) respond_to do |format| format.html format.xls end end |