rails-activerecord tag

33 questions


2 answers
50 views
0
How to Configure Columns That Do Not Match Naming Conventions in ActiveRecord

Thank you for your help.Tell me about ActiveRecord.ActiveRecord automatically creates relationships and inserts data according to the column naming convention, but how do I set up columns when I want ...

1 years ago

4 answers
64 views
0
How to Specify a Relationship Column in ActiveRecord

PostidtitlebodyCommentidbodypost_idWhen you combine these two in a relationship, you don't know how to specify columns to retrieve data.For example, if I want to get Post.id, Post.title, Comment.id, C...

1 years ago

1 answers
50 views
0
I want to set up a relationship other than table+_id in rails.

Item_id in parent table, item_id in child table, item_id as key Parent table has_many child tableChild Table Belongs_to Parent Table I want to have a one-to-many relationship like this

« - 4 -

© 2024 OneMinuteCode. All rights reserved.