debian-mirror-gitlab/doorkeeper/spec/dummy/app/controllers/home_controller.rb
2020-01-04 02:51:38 +05:30

17 lines
383 B
Ruby

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