db346fb66f
- /users/siret/ redirect to /users/procedure/ - siren can be past on the URL /users/siret and /users/procedure
15 lines
422 B
Ruby
15 lines
422 B
Ruby
class Users::SiretController < UsersController
|
|
def index
|
|
@procedure = Procedure.find(params['procedure_id'])
|
|
@siret = params[:siret] || current_user.siret
|
|
|
|
redirect_to(users_path(procedure_id: @procedure, siret: @siret))
|
|
|
|
rescue ActiveRecord::RecordNotFound
|
|
error_procedure
|
|
end
|
|
|
|
def error_procedure
|
|
render :file => "#{Rails.root}/public/404_procedure_not_found.html", :status => 404
|
|
end
|
|
end
|