我在 hartl rails 教程的第 9 节中,这个 def 没有意义。想法?
1) User pages index
Failure/Error: visit users_path
ActionView::Template::Error:
wrong number of arguments (2 for 1)
# ./app/helpers/users_helper.rb:3:in `gravatar_for'
# ./app/views/users/index.html.erb:7:in `block in _app_views_users_index_html_erb__3004047397113020476_70255017945740'
# ./app/views/users/index.html.erb:5:in `each'
# ./app/views/users/index.html.erb:5:in `_app_views_users_index_html_erb__3004047397113020476_70255017945740'
# ./spec/requests/user_pages_spec.rb:12:in `block (3 levels) in <top (required)>'
2) User pages index should list each user
Failure/Error: visit users_path
ActionView::Template::Error:
wrong number of arguments (2 for 1)
# ./app/helpers/users_helper.rb:3:in `gravatar_for'
# ./app/views/users/index.html.erb:7:in `block in _app_views_users_index_html_erb__3004047397113020476_70255017945740'
# ./app/views/users/index.html.erb:5:in `each'
# ./app/views/users/index.html.erb:5:in `_app_views_users_index_html_erb__3004047397113020476_70255017945740'
# ./spec/requests/user_pages_spec.rb:12:in `block (3 levels) in <top (required)>'