Sha256: 358640da97a3a3272640b0d24bdd08f7da37233f04540bb8b9781257ac829b15

Contents?: true

Size: 953 Bytes

Versions: 13

Compression:

Stored size: 953 Bytes

Contents

class IntegrationSessionsController < ActionController::Base
  def new
    @user_id = params[:user_id]
    render 'features/support/integration_sessions_form', layout: false
  end
  
  def create
    sign_in_and_redirect User.friendly.find(params[:user_id])
  end
end

#Copypasta from http://openhood.com/rails/rails%203/2010/07/20/add-routes-at-runtime-rails-3/
_routes = nil

begin
  _routes = Volontariat::Application.routes
  _routes.disable_clear_and_finalize = true
  _routes.clear!
  
  Volontariat::Application.routes_reloader.paths.each{ |path| load(path) }
  
  _routes.draw do
    # here you can add any route you want
    post 'integration_sessions' => 'integration_sessions#create', :as => 'integration_sessions'
    get 'integration_sessions' => 'integration_sessions#new', :as => 'new_integration_sessions'
  end
  
  ActiveSupport.on_load(:action_controller) { _routes.finalize! }
ensure
  _routes.disable_clear_and_finalize = false
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
voluntary-0.7.1 lib/generators/voluntary/install/templates/features/support/integration_sessions_controller.rb
voluntary-0.7.0 lib/generators/voluntary/install/templates/features/support/integration_sessions_controller.rb
voluntary-0.6.0 lib/generators/voluntary/install/templates/features/support/integration_sessions_controller.rb
voluntary-0.5.2 lib/generators/voluntary/install/templates/features/support/integration_sessions_controller.rb
voluntary-0.5.1 lib/generators/voluntary/install/templates/features/support/integration_sessions_controller.rb
voluntary-0.5.0 lib/generators/voluntary/install/templates/features/support/integration_sessions_controller.rb
voluntary-0.4.0 lib/generators/voluntary/install/templates/features/support/integration_sessions_controller.rb
voluntary-0.3.0 lib/generators/voluntary/install/templates/features/support/integration_sessions_controller.rb
voluntary-0.2.4 lib/generators/voluntary/install/templates/features/support/integration_sessions_controller.rb
voluntary-0.2.3 lib/generators/voluntary/install/templates/features/support/integration_sessions_controller.rb
voluntary-0.2.2 lib/generators/voluntary/install/templates/features/support/integration_sessions_controller.rb
voluntary-0.2.1 lib/generators/voluntary/install/templates/features/support/integration_sessions_controller.rb
voluntary-0.2.0 lib/generators/voluntary/install/templates/features/support/integration_sessions_controller.rb