twitterのようなカバー写真、プロフィール画像、自己紹介を編集できるviewを作成しているのですが、下記コードにてタイトルのエラーが発生しています。
- provide(:title, @user.nickname) .jumbotron3.jumbotron-extend .jumbotron-container .row = form_for(@user, html: { method: :put }) do |f| .profile-cover-image - if @user.profile_cover_image? = image_tag @user.profile_cover_image.url - else = image_tag("/images/icon/no-image.png") = f.file_field :profile_cover_image %aside.col-md-4 .profile-image - if @user.profile_image? = image_tag @user.profile_image.url - else = image_tag("/images/icon/no-image.png") = f.file_field :profile_image / %h3.user-nickname= @user.nickname = f.text_field :nickname, autofocus: true, class: 'form-control user-nickname', autocomplete: "nickname" .self-introduction - if @user.self_introdunction? = @user.self_introdunction - else = "" = f.text_field :self_introdunction %section.stats.grid-cell = render 'shared/stats' = link_to 'キャンセル', user_path(current_user), class: 'btn btn-primary', :id => "button7" = f.submit '変更を保存', user_path(current_user), class: 'btn btn-primary', :id => "button8"
ググって調べると、doがどこかにないのかなという気がしたので、下記のコードを直したら別のエラーが出ました。
●直したコード
= link_to 'キャンセル', user_path(current_user), class: 'btn btn-primary', :id => "button7" do
●上記を直したら、新たに発生したエラー
syntax error, unexpected ')' )).to_s);).to_s);; _hamlout.bu..
結局のところエラーは解消できず、doを上記で追記することも合っているのかわからない状態です。
もし、お分かりになる方がいらっしゃいましたら教えて頂けれと思います。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/08/18 11:16