Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- localhost:3000/phones?user_email=prashanth.pola560@gmail.com&user_token=dkiR3-QVBYz1ty8x3BAQ
- Started GET "/phones?user_email=prashanth.pola560@gmail.com&user_token=dkiR3-QVBYz1ty8x3BAQ" for 127.0.0.1 at 2017-07-08 17:42:10 +0530
- Processing by PhonesController#index as HTML
- Parameters: {"user_email"=>"prashanth.pola560@gmail.com", "user_token"=>"dkiR3-QVBYz1ty8x3BAQ"}
- Completed 401 Unauthorized in 1ms (ActiveRecord: 0.0ms)
- Started GET "/users/sign_in" for 127.0.0.1 at 2017-07-08 17:42:10 +0530
- Processing by Devise::SessionsController#new as HTML
- Rendering /home/prashanth/.gems/gems/devise-4.3.0/app/views/devise/sessions/new.html.erb within layouts/application
- Rendered /home/prashanth/.gems/gems/devise-4.3.0/app/views/devise/shared/_links.html.erb (1.0ms)
- Rendered /home/prashanth/.gems/gems/devise-4.3.0/app/views/devise/sessions/new.html.erb within layouts/application (4.4ms)
- Completed 200 OK in 26ms (Views: 25.4ms | ActiveRecord: 0.0ms)
- class ApplicationController < ActionController::Base
- protect_from_forgery with: :exception
- acts_as_token_authentication_handler_for User
- end
- class User < ApplicationRecord
- # Include default devise modules. Others available are:
- # :confirmable, :lockable, :timeoutable and :omniauthable
- devise :database_authenticatable, :registerable,
- :recoverable, :rememberable, :trackable, :validatable
- acts_as_token_authenticatable
- end
- class PhonesController < ApplicationController
- before_action :set_phone, only: [:show, :edit, :update, :destroy]
- before_action :authenticate_user!
- # GET /phones
- # GET /phones.json
- def index
- @phones = Phone.all
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement