0

Recently I've been developing a simple website as a learning process, and I've come across a problem. I've separated out the database into two tables, a 'user' tables, and a 'character' table. The problem I'm facing is I need to select all the user's characters from the character table without creating any models for the character (as that's handled elsewhere). Is there any way I could go about solving this?

I do also have a table which has three columns; "id", "user_id", and "character_id"

Help is appreciated!

Thanks, Adil

1 Answer 1

2

You can use ActiveRecord::Base.connection.execute("some sql query here")

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.