Created
March 28, 2019 12:19
-
-
Save MaryKuz/d7e27c3661a137e24e60afe6901ab1da to your computer and use it in GitHub Desktop.
Start writing app/controllers/sessions_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Api::SessionsController < ApplicationController | |
private | |
def build_resource | |
@session = Session.new resource_params | |
end | |
def resource | |
@session ||= Session.new user: current_user | |
end | |
def resource_params | |
params.require(:session).permit(:email, :password) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment