rails-activerecord tag

33 questions


1 answers
512 views
0
I introduced erd to output ER diagrams in rails, but I got an error.

I introduced erd to output ER diagrams in rails, but I got an error.This is the procedure I tried.Create an ER diagram automatically with Rails ERD!Options includedHowever, the erd command also genera...


1 answers
82 views
0
Which performance is better, ActiveRecord or Array, when performing multiple records narrowing in rails?

This is a performance discussion regarding how to narrow down records in the development of rails applications.When performing multiple record narrowing, which is better in response memory, using SQL ...


1 answers
78 views
0
I want to keep the rails associated with sorting.

Post has_many Comment@post=Post.find(xxx)@[email protected]@post.comments I'd like to sort the comments, what should I do?


1 answers
150 views
0
I am creating an app for Rails.How do I sort columns by minimum → maximum in ActiveRecord?

I am currently creating an app for Rails.Below, I would like to sort by sign column minimum value → maximum value in the costs table, what should I do?The reason why I wanted to sort by sign column mi...


1 answers
77 views
0
Understanding the View Table Display of Rails Table Results

I'm a beginner.If you want to display the results in view from the results obtained from the model, If the contents of the model become variable (the process of changing the model with connection each...


3 answers
78 views
0
To aggregate the latest records by user_id

I want Rails to prepare an ActiveRecord::Relation object to pass to view, but I can't aggregate it as intended. It's to aggregate the latest records for each user_id.There is an entrance/exit model ca...


1 answers
133 views
0
[Rails] How to sort the data in the parent table by the number of retrieved data in the child table

I'm worried about how to change the order in which Rails outputs from activerecord. as shown belowParent Table - postThe child table-like is associated.#app/models/post.rbclass Post has_many —likeend#...


1 answers
141 views
0
How to Extract a Specified Record in ActiveRecord

Current situation/what you want to realizeI would like to ask you a question regarding the captioned matter.】What I want to realize したい(I want to win first place in each composition) [Current situatio...


1 answers
102 views
0
Why do rails use datetime instead of timestamp for created_at?

Rails ActiveRecord creates a datetime type on the DB for columns created_at and updated_at that are introduced in migration with t.timestamps at least in MySQL.The datetime type is close to storing th...


2 answers
78 views
0
Search by ignoring data space in activecord

http://tutty.info/521How do I run these queries in Activeecord?

2 years ago
- 1 - »

© 2024 OneMinuteCode. All rights reserved.