[RUBY] Solved the problem that all the data in the table was displayed

I'm currently making a personal app to change jobs to a web engineer. I'm having trouble solving an error that occurred during personal application development.

The problem you are having

I want to display only posts, but I want to delete all the information I put in the table because it has appeared on the browser. スクリーンショット 2020-05-25 22.13.16.png

= @posts.each do |post|

When I commented out this part, it disappeared, so it seems to be related to the description here.


# before(Is displayed)
= @posts.each do |post|
# after(Do not show)
- @posts.each do |post|

In Ruby, it was set to be displayed as = and not displayed as -. The answer was simple. .. ..

Recommended Posts

Solved the problem that all the data in the table was displayed
Solved the problem that the scroll event did not fire in JQuery
The problem that the contents of params are completely displayed in the [Rails] view
How to clear all data in a particular table
Solved the problem that profile and logout were not displayed on the screen after signup.
A story that solved the problem that the Java (jdk) version was too high to use the h2o library in R and R Studio.
About the problem that the image is not displayed after AWS deployment
The problem that XML attributes are sorted arbitrarily in Android Studio
Problem that the attribute of User model becomes nil in ActionMailer
Expression used in the fizz_buzz problem
Was that so, the user_signed_in? method
Show all data stored in UserDefaults
[Rails] About the error that the image is not displayed in the production environment
Let's stop the god entity that expresses all stats in one class!
[JPA] Compare table1 and table2 to get and update data that does not exist in table2.
Character string comparison: I was caught in the skill check problem of Paiza
Code that deletes all files of the specified prefix in AWS S3 (Java)
How to make a unique combination of data in the rails intermediate table
I want you to put the story that the error was solved when you stabbed the charger in the corner of your head