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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:18:51+00:00 2026-06-03T06:18:51+00:00

This is mostly an implementation question for a webapp I’m trying to develop. I’m

  • 0

This is mostly an implementation question for a webapp I’m trying to develop. I’m relatively inexperienced so I want to check if my idea for implementation is decent or if there’s a much easier way.

The Problem

I want to create a scrollable sidebar that automatically fills with small containers that hold a user profile photo and their name. The basic idea is that a user is a member of a class and the sidebar should hold all of their classmates. The sidebar should be a fixed size and the user should be able scroll down through their classmates and click on a user if they want visit their page.

My Ideas For Implementing

It seems to me that I will need to use some embedded ruby to direct the filling process. Some psuedocode would be something along the lines of “For every user in this class, create a container with their picture and name”. I haven’t given a lot of thought as to actually handle this step but I’m mostly concerned with the actual html structure.

My idea is to do something like this:

<div class="container-fluid">
    <div class="row-fluid">
        <div class="span2">
            <!-- for each user in class -->
                <div class="container-fluid">
                    <div class="row-fluid">
                        <div class="span">
                            <!-- Load appropriate user data -->
</div> where appropriate...

Is this the “proper” way to go about implenting this? I haven’t been able to find much information on the idea and visit an example site’s source code isn’t all that helpful as the sidebar is already filled…

  • 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-03T06:18:53+00:00Added an answer on June 3, 2026 at 6:18 am

    I would separate your sidebar HTML and logic into a partial, E.g. “app/views/shared/_sidebar.html.erb”. From there on, you can accept a collection of data from whatever view you’re rendering.

    View file

    <div class="container-fluid">
      <div class="row-fluid">
        <%= render "shared/sidebar", collection: @users %>
      </div>
    </div>
    

    Sidebar partial

    <div class="span2">
      .....
        <% @users.classmates.each do |e| %>
          <%= e.name %>
        <% end %>
      .....
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is mostly a theoretical question I'm just very curious about. (I'm not trying
This is mostly a Data Struct question but the implementation is on the iphone.
This is mostly just out of curiosity, and is potentially a silly question. :)
This is mostly a data warehouse philosophy question. My project involves an Oracle forms
This question is mostly academic. I ask out of curiosity, not because this poses
I'm trying to write this code using mostly arrays. I'm trying to get Correct
I'm posing this question mostly out of curiosity. I've written some code that is
This question is mostly curiosity than anything else. But I currently place all my
I have a question which is mostly answered by this question . However, I
This is mostly a philosophical question about the best way to interpret the HTTP

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.