It looks like you have the form_tag line indented further than the h2
line above it. As a result, haml thinks you are trying to put a form
tag _inside_ an h2 tag, something that is not allowed.
:brad
On Nov 26, 2008, at 20:43, Bharat <[EMAIL PROTECTED]> wrote:
>
> This is not a promising start. My first attempt at creating Haml
> bombs at line 3 of the following code:
>
> - column_div :type => :primary do
> %h2 Sign In
> - form_tag session_path do
> #standard
> .form_row
> %label{:for => "email"} Email address
> = text_field_tag 'email', nil, :maxlength =>
> Person::MAX_EMAIL
> = set_focus_to 'email'
> .form_row
> %label{:for => "password"} Password
> = password_field_tag 'password', params
> [:password], :maxlength => Person::MAX_PASSWORD
> #openid.form_row
> %label{:for => 'openid_url'} OpenID
> = text_field_tag 'openid_url'
> .form_row
> %label.checkbox{:for => 'remember_me'} Remember me:
> = check_box_tag 'remember_me', '1', true, :class => "checkbox"
> .form_row
> = submit_tag 'Sign in', :class => "button"
> %div{:style => "text-align: center; font-size: 12px; padding:
> 10px;"}
> = link_to "or Sign up", signup_path
> %br/
> -if global_prefs.can_send_email?
> = link_to "I forgot my password!", new_password_reminder_path
> %span{:id="noscript", :style="display:none;"}
> %span#openid_link
> %a{:href => "#", :onclick => "show_openid(); return false;"}
> Login using OpenID
> %span#standard_link
> %a{:href => "#", onclick => "show_openid(); return false;"}
> Login using OpenID
>
>
> And here is the error message:
>
> Illegal nesting: content can't be both given on the same line as %h2
> and nested within it.
>
> Extracted source (around line #3):
>
> 1: - column_div :type => :primary do
> 2: %h2 Sign In
> 3: - form_tag session_path do
> 4: #standard
> 5: .form_row
> 6: %label{:for => "email"} Email address
>
> What am I doing wrong? I was following this example in the
> documentation:
>
> !!! XML
> !!!
> %html
> %head
> %title Myspace
> %body
> %h1 I am the international space station
> %p Sign my guestbook
>
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---