I check there is no model for oauth_access_tokens in rails app but I can use sql to check the tokens. How can I use SQL to check for existence of tokens for specific user. My current solution which is not working is as follow:
query = "SELECT user_id FROM table_name"
found = false
ActiveRecord::Base.connection.select_all(query) do |r|
if r.user_id == "my_user_id"
found = true
break
end
end
assert found