debian-mirror-gitlab/doorkeeper/spec/dummy/app/controllers/home_controller.rb

18 lines
383 B
Ruby
Raw Normal View History

2020-01-04 02:51:38 +05:30
class HomeController < ApplicationController
def index
end
def sign_in
session[:user_id] = if Rails.env.development?
User.first || User.create!(name: 'Joe', password: 'sekret')
else
User.first
end
redirect_to '/'
end
def callback
render plain: 'ok'
end
end