Sha256: 9a14f3fff1d65361c4e3397c7657b5b8f70242ffe93e1a85031c379d91864d68

Contents?: true

Size: 363 Bytes

Versions: 7

Compression:

Stored size: 363 Bytes

Contents

class HomeController < ApplicationController
  def index
  end

  def sign_in
    session[:user_id] = if Rails.env.development?
                          User.first || User.create!(name: 'Joe')
                        else
                          User.first
                        end
    redirect_to '/'
  end

  def callback
    render plain: 'ok'
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
capcoauth-0.7.0 spec/dummy/app/controllers/home_controller.rb
capcoauth-0.6.3 spec/dummy/app/controllers/home_controller.rb
capcoauth-0.6.2 spec/dummy/app/controllers/home_controller.rb
capcoauth-0.6.1 spec/dummy/app/controllers/home_controller.rb
capcoauth-0.6.0 spec/dummy/app/controllers/home_controller.rb
capcoauth-0.5.1 spec/dummy/app/controllers/home_controller.rb
capcoauth-0.5.0 spec/dummy/app/controllers/home_controller.rb