LoginSignup
0
0

More than 1 year has passed since last update.

【ActionView::SyntaxErrorInTemplate in TweetsController#edit】unexpected end...エラーの解決方法

Last updated at Posted at 2022-12-07

エラー内容

ActionView::SyntaxErrorInTemplate in TweetsController#edit というエラーが表示された。
ActionView SyntaxErrorInTemplate in TweetsController edit.png

原因

・え、</div>が多いってこと?どういうことや!と思ったら、<% end %>の消し忘れでした。。
 よくみたらunexpected end...と言われていますね(-_-;)

解決方法

【以下は誤り】

<div class="contents row">
  <div class="container">
    <h3>編集する</h3>
      <%= render partial: "form", locals: { tweet: @tweet } %>
    <% end %>
  </div>
</div>



【正しくは以下】

<div class="contents row">
  <div class="container">
    <h3>編集する</h3>
    <%= render partial: "form", locals: { tweet: @tweet } %>
  </div>
</div>
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0