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 8120797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:16:04+00:00 2026-06-06T05:16:04+00:00

Please forgive me. I am definitely a beginner at Haml and Ruby on Rails.

  • 0

Please forgive me. I am definitely a beginner at Haml and Ruby on Rails. Anyway, I have a web application, where at the top of the page, I am keeping track of the various elements on the page. The code that renders this page is as follows:

  - if @item_collection.is_a?(Feature)
    = render 'edit_fields', :f => f
  - else
    = render 'fields', :f => f

For my page, the else clause would be executed. The code behind my page is:

.field.large
  = f.label      :name, nil, 'data-help-id' => 'page_name'
  = f.text_field :name, disabled_if_unauthorized(@item_collection, :maxlength => 255, :title => "Edit Page")
  = f.error_message_on(:name, :css_class => 'error_message')
.field
  = f.label      :path, nil, 'data-help-id' => 'page_path'
  = f.text_field :path, disabled_if_unauthorized(@item_collection, { :maxlength => 255, :class => 'extra_margin', :title => "Edit Page" })
  = f.error_message_on(:path, :css_class => 'error_message')
.field.info
  = f.label      'Info'
  %ul.elements_count
    %li.elements_in_use{ :id => 'elements_in_use'}
    %li.unused_elements{ :id => 'unused_elements'}
    %li.undefined_elements{ :id => 'undefined_elements'}

When the “Save” button is clicked, the unordered list (elements_count) disappears. I know it’s because I don’t have “f.” in front of those elements. The thing is, and again, forgive me because I’m just a beginner, putting “f.” in front of the list elements won’t work because %ul and %li are not Rails field helpers. Does anyone know what I can do to get these list elements to quit disappearing? Thanks!

  • 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-06-06T05:16:05+00:00Added an answer on June 6, 2026 at 5:16 am

    You’re correct in that you don’t need ‘f’ in front of non rails form helpers.

    Tried a similar setup to yours and I see the unordered list show up (with no content), do you see the list if you view source? Maybe a CSS file is hiding the bullets?

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

Sidebar

Related Questions

Please forgive this simplistic iphone development question. I have written a web application in
Please forgive me if this is an obvious one. I have an unknown amount
please forgive my windows ignorance, Is there an application which can show me which
please forgive me if this is a noob question, but i'm a beginner at
Please forgive me for being a complete beginner: I am trying to log into
Please forgive me as I am just learning MVC3. I have 2 db tables
Please forgive if i use terminology wrong, but i'm new to java-web development and
Please forgive my gherkin Given I have a module called Hello And it has
Please forgive the newbie question. I have an iphone game that currently uses lots
Please forgive my ignorance, I am new to Ruby. I know how to search

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.