Boltgreywing
Senior Member
So I am having a bit of an issue. I have a user_id that is filled with the string bbones.
Yet when I try to search for it using User.find_by_vname it results in a nil value being returned.
What weird about this is that the vname actually does exist in the sql table itself.
In Rails 3.2 this worked fine and I had no issues, but with rails 5.2 it doesn't seem to work.
I could really use some help with this issue as I have no idea why this is occurring.
This is a snippet of the code from my colorscheme helper
def displayColorOwner
value = "Colorscheme List"
somevalue = params[:user_id]
if(somevalue)
userFound = User.find_by_vname(somevalue)
if(userFound)
raise "I am found"
value = (userFound.vname + "'s colorschemes")
else
raise "I am not found even though: #{somevalue}"
end
end
return value
end
Yet when I try to search for it using User.find_by_vname it results in a nil value being returned.
What weird about this is that the vname actually does exist in the sql table itself.
In Rails 3.2 this worked fine and I had no issues, but with rails 5.2 it doesn't seem to work.
I could really use some help with this issue as I have no idea why this is occurring.
This is a snippet of the code from my colorscheme helper
def displayColorOwner
value = "Colorscheme List"
somevalue = params[:user_id]
if(somevalue)
userFound = User.find_by_vname(somevalue)
if(userFound)
raise "I am found"
value = (userFound.vname + "'s colorschemes")
else
raise "I am not found even though: #{somevalue}"
end
end
return value
end