demarches-normaliennes/app/controllers/users/procedure_controller.rb
Xavier J db346fb66f - create route /users/procedure/:procedure_id to replace /users/siret/?procedure_id=
- /users/siret/ redirect to /users/procedure/
- siren can be past on the URL /users/siret and /users/procedure
2015-11-20 18:14:52 +01:00

12 lines
354 B
Ruby

class Users::ProcedureController < UsersController
def index
@procedure = Procedure.find(params[:procedure_id])
@siret = params[:siret] || current_user.siret
rescue ActiveRecord::RecordNotFound
error_procedure
end
def error_procedure
render :file => "#{Rails.root}/public/404_procedure_not_found.html", :status => 404
end
end