Я новичок с рубинами на рельсах, и я пытаюсь показать только электронное письмо пользователя, но также отображается все поле пользователя, и я не понимаю, где проблема.Как устранить некоторые детали, которые я не хочу показывать?
Это мой Индексный метод в users_controller
def index
@users=User.all
end
Это мой index.html.erb
:
<h1>Users#index</h1>
<%= link_to 'Register', new_user_url %><br/>
<ul>
<%= @users.each do |user| %>
<li><%= user.email %></li><br/>
<% end %>
</ul>
Какой сервер возвращает:
Started GET "/" for 127.0.0.1 at 2014-10-14 12:15:44 +0100
ActiveRecord::SchemaMigration Load (1.0ms) SELECT `schema_migrations`.* FROM `schema_migrations`
Processing by UsersController#index as HTML
User Load (2.0ms) SELECT `users`.* FROM `users`
Rendered users/index.html.erb within layouts/application (21.0ms)
Completed 200 OK in 38796ms (Views: 38714.2ms | ActiveRecord: 2.0ms)
спасибо большое :))) – rota90