html.hamlで実行したところ、以下のエラーが発生しました。おそらくdiv_forが原因だとは思うのですが、対処法が分かりません。どなたかご教授願いませんでしょうか?
・エラー
NoMethodError in Tweets#index
The div_for
method has been removed from Rails. To continue using it, add the record_tag_helper
gem to your Gemfile:
gem 'record_tag_helper', '~> 1.0'
Consult the Rails upgrade guide for details.
・コード
div_for @tweets〜でつまづいています、
.col-xs-8.right-content .list-group = div_for @tweets, class: "list-group-item" do |t| %h4.user %span.user-name = link_to render_user_screen_name(t.user), user_path(t.user) %span.user-id @#{t.user.name} %span.time.pull-right = distance_of_time_in_words_to_now(t.created_at) .clear .tweet-content %p = t.content
・やったこと
Gemfileにgem 'record_tag_helper', '~> 1.0'を追加し、bundle install
・バージョン
Rails: 5.0.0.1
Ruby 2.3 0p0
よろしくお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/11/09 11:26