Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7061073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:25:46+00:00 2026-05-28T04:25:46+00:00

Have converted devise new session from erb to Haml but doens’t work, this is

  • 0

Have converted devise new session from erb to Haml but doens’t work, this is the code:

%div.row.show-grid
 %div.span8.offset7
  %h1 Sign in

  - form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| 
   %div.clearfix
   = f.label :email 
    %div.input
     = f.email_field :email, :class => 'xlarge', :id => 'admin_email' 
    %div.clearfix       
    = f.label :password 
    %div.input
     = f.password_field :password, :class => 'xlarge', :id => 'admin_password' 
     - if devise_mapping.rememberable? 
      %div = f.check_box :remember_me  
      = f.label :remember_me 
    %div = f.submit "Sign up" 

and this is the originally erb code:

<div class="row show-grid">
    <div class="span8 offset7">


<div class="page-header">
    <h1>Sign in</h1>
  </div>
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>

  <div class="clearfix">
            <%= f.label :email %>
            <div class="input">
              <%= f.email_field :email, :class => 'xlarge', :id => 'admin_email' %>
            </div>
          </div>

   <div class="clearfix">
            <%= f.label :password %>
            <div class="input">
              <%= f.password_field :password, :class => 'xlarge', :id => 'admin_password' %>
            </div>
          </div>
            <% if devise_mapping.rememberable? -%>
    <div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
  <% end -%>

          <div><%= f.submit "Sign up" %></div>

<% end %>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T04:25:47+00:00Added an answer on May 28, 2026 at 4:25 am

    First, you can use .class and #id directly, they’re a shortcut for %div.class and %div#id

    Second, this error is usually triggered in a “block” of code, as in:

    - if cond
      =# instr
    

    or

    - form_for(options) do |f|
      =# instr
    

    Giving us the error line would help. But I’d say you messed up with indentation in one of said code blocks.

    EDIT

    Oh I get it. You forgot to indent line 7, = f.label :email. Also, %tag = code won’t work, you have to either nest it, or do it with %tag= code

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have converted an array to object data like this: <?php $myobject->data = (object)Array('zero','one','two');
Using explode i have converted the string into array , But the array look
I have just converted a project from Visual Studio 2003 to 2005 and although
I am a relatively new Android developer but have gotten pretty familiar with the
I've converted from using MGTwitterEngine to the new iOS 5.0 twitter API. My app
I have converted an Entity framework project to use POCO objects by removing the
I have converted my Datatable to json string use the following method... public string
I have a 3rd party JAR that I have converted to an OSGI bundle
I am working with a set of data that I have converted to a
I have two dates in format(MM/dd/yyyy hh:mm:ss:SS). For the both dates I have converted

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.