link_to (Haml)タグにクラス名をつける

syntax error, unexpected keyword_ensure, expecting end-of-input

Haml in Rails:画像をリンクにするときのエラー:

間違えたコード:

= link_to %a{:href => "file:///Users/HOkaniwa/Desktop/IBplat%202/Questions%23index_home.html"}
  = image_tag "logo2.png"

エラー:SyntaxError in QuestionsController#index

直したコード:
    %li= link_to image_tag('logo2.png', id:"logo"), questions_path
画像を使わない他の例:
    %li= link_to '質問する', questions_path, class: "a btn btn-default" 
直すこと

1:パス名を確認して直す。

(NameError in Questions#indexを直す) http://localhost:3000/rails/info/routes をみて、questions からquestions_path として正しいパスを書く。 この場合はindexアクションだったため、以下; = link_to 'image_tag "logo2.png"', questions_path

 
エラー:このままだとイメージタグが文字としてページに表示される。
ためしに' 'をなくしてみると = link_to image_tag "logo2.png", questions_path となり、エラーが出る。
undefined method `symbolize_keys' for "/questions":String
 
2: image_tag('image名') とする。
      = link_to image_tag('logo2.png'), questions_path
 
3: HTML inputを Haml text_fieldにする
エラー:Syntax error
=form_for :question, url: questions_path do |f|
%p
= f.label :質問タイトル
= f.text_field :question_title 'text_field',:class => "input form-control"
%p
= f.label :質問内容
= f.text_area :question_content
%p
= f.submit
もとのコード:
%input.form-control{:placeholder => "質問のタイトル", :type => "text"}
 
直したコード:
            = f.text_field :question_title, :class => "input form-control",:placeholder => "質問のタイトル", :type => "text"