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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:50:24+00:00 2026-05-31T03:50:24+00:00

My haml : – for status in current_account.job_statuses.active = link_to status.name, ‘#’, :class =>

  • 0

My haml :

- for status in current_account.job_statuses.active
  = link_to status.name, '#', :class => params[:job_status_id].to_i == status.id ? "current status block" : "status block", :rel => status.id

My html :

<a rel="1" class="status block" href="#">in progress</a>
<a rel="2" class="status block" href="#">in progress</a>
<a rel="3" class="status block" href="#">in progress</a>
<a rel="4" class="status block" href="#">in progress</a>

My Test :

test 'index - job_status: set' do
  job_status = @account.job_statuses.create! :name => 'foo'
  job_status.reload

  @job.update_attribute :job_status_id, job_status.id
  @job.reload

  get :index, :job_status_id => job_status.id.to_s
  assert_response :success
  assert_template 'jobs/index'

  jobs = assigns(:jobs)

  assert jobs.include?(@job)
  assert_select 'div.status[rel=?]', job_status.id
end

But I get this failure :

  3) Failure:
test_index_-_job_status:_set(NewJobsControllerTest)
    [test/functional/new_jobs_controller_test.rb:127:in `block in <class:NewJobsControllerTest>'
     test/test_helper.rb:221:in `run'
     test/test_helper.rb:221:in `run']:
Expected at least 1 element matching "div.status[rel='16']", found 0.
<false> is not true.

Is this for an obvious dumb reason? I apologize if it is.. I can’t figure it out.

  • 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-31T03:50:25+00:00Added an answer on May 31, 2026 at 3:50 am

    Oh. It’s always the little things we never think to check… After staring uselessly at that HAML I asked for for five minutes it hit me:

    Those ain’t DIVs. Those are As.

    Cheers!

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

Sidebar

Related Questions

HAML: = link_to 'redeem', redeem_admin_organization_path(organization), :class => 'button_short live redeem' Controller: def redeem @organization
I am using haml to display the user's name and nickname (in a single
shared/_comments.html.haml #comments - commentable.comments.each do |comment| = link_to image_tag(avatar_url comment.user_id,36), :controller => 'users', :action
I have in my haml: = link_to(Calls Today, todo_path) And in my routes.rb: match
I have the following haml: 9 %strong Asked by: 10 = link_to @user.full_name, user_path(@user)
Just starting out with HAML, how do I convert this? <div class=fb-like data-href=http://localhost:3000 data-send=true
I'm creating a haml table like so: %tbody - @records.each do |br| %tr %td.name
I have a small HAML paragraph with links like this: %p =link_to(My Disclosures, #)
I have this HAML page: -content_for :primary_content do Hmmm %strong{:class => code, :id =>
I have some HAML code like this: .clearfix =f.label t(labels.shortened_urls.fqdn_url) =f.url_field :fqdn_url, {:readonly =>

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.