ビューに HAML を使用するように切り替えようとしていますが、予期しない KENSURE メッセージが表示され続けます。html2haml を使用して、作業中のビュー ファイルを切り替えました。最初に実行したところ、html2haml の出力に含まれていた終了は必要ないことがわかったので、それを削除したところ、フォームが終了していないことを訴えているように見えるエラーが発生しました。
私は何を間違っていますか?
エラーメッセージ:
compile error
app/views/sessions/new.html.haml:20: syntax error, unexpected kENSURE, expecting kEND
app/views/sessions/new.html.haml:22: syntax error, unexpected $end, expecting kEND
application.html.haml:
!!!
%html
%head
%title
= APP_CONFIG[:site_name] + ': ' + @page_title
== <meta http-equiv="content-type" content="text/xhtml; charset=utf-8" />
== <meta http-equiv="imagetoolbar" content="no" />
== <meta name="distribution" content="all" />
== <meta name="robots" content="all" />
== <meta name="resource-type" content="document" />
== <meta name="MSSmartTagsPreventParsing" content="true" />
= stylesheet_link_tag 'base'
= javascript_include_tag :defaults
%body
#container
#header
- if logged_in?
= link_to 'Logout', logout_path
- else
= link_to 'Login', login_path
= link_to 'Signup', signup_path
#content
= flash_messages
= yield :layout
および sessions/new.html.haml
= title "Login", :h2
- form_tag session_path do
%fieldset
%legend
Your Details
%ol
%li
= label_tag 'login', 'Username'
= text_field_tag 'login', @login
%li
= label_tag 'password'
= password_field_tag 'password', nil
%li
= label_tag 'remember_me', 'Remember me'
= check_box_tag 'remember_me', '1', @remember_me
.buttons
= submit_tag 'Login'
= link_to 'Forgotten Password', forgot_password_path