I'm currently trying to get used to rails by creating a website with admin and user. However, when displaying the user list in admin dashboard, for some reasons these lines appear:
[#<User id: 1, email: "admin@gmail.com", password_digest: [FILTERED], created_at: "2022-08-09 03:47:52.264555000 +0000", updated_at: "2022-08-09 03:47:52.264555000 +0000", firstname: nil, lastname: nil, last_change: nil>, #<User id: 3, email: "asd@asd.com", password_digest: [FILTERED], created_at: "2022-08-19 08:32:37.086901000 +0000", updated_at: "2022-08-19 08:32:37.086901000 +0000", firstname: nil, lastname: nil, last_change: nil>, #<User id: 4, email: "asd@gmail.com", password_digest: [FILTERED], created_at: "2022-08-19 08:32:58.497826000 +0000", updated_at: "2022-08-19 08:32:58.497826000 +0000", firstname: nil, lastname: nil, last_change: nil>]
This is the code that I used to display user list:
<%= @users.each do |hello| %>
<%= form_with model: @user, url: '/admin/users/delete' do |f| %>
<%= hello.email %>
<%= hidden_field_tag( :id, hello.id) %>
<%=f.submit "Delete"%>
<%end%>
<hr>
<%end%>
And this is the picture of the display I got: Image
Really appreciate if you can help. Thanks!