ByeBug or Pry not running on one of the controllers on Rails app

551 Views Asked by At

I have two controllers, One lets me use byebug and pry, the other just skips it, not sure why. Wondering if anyone has ran into a similar issue. I have installed pry and byebug correctly for it to work on one of the controllers, i try to import and call pry correctly.

require 'pry'

class UsersController < ApplicationController
  skip_before_action :authenticate_user!, only: [:index]

  before_action :set_current_user_for_view

  def index
    @users = User.order(created_at: :desc)
  end

  def show
    binding.pry
    @user = User.find_by!(username: params[:id])
  end
end

I know the information i'm providing is not great, i'm new to Rails so let me know if you need any further info

0

There are 0 best solutions below