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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:58:49+00:00 2026-05-29T21:58:49+00:00

I am new to programming, just completed RailsTutorial and now am trying to build

  • 0

I am new to programming, just completed RailsTutorial and now am trying to build a Pinterest-type site using Rails.

I’d like for the main site to display items through multiple columns and in an infinite loop like:

1 2 3 4 5

6 7 8 9 10

. . . . .

I’ve got the layout that I’d like, but don’t know how to break the content feed into the multiple divs.

home.html.erb (I know this is wrong)

<% if signed_in? %>

  <div id="container" summary="For signed-in users">
    <div class="news-column1"><%= render 'shared/feed' %></div>
    <div class="news-column2"><%= render 'shared/feed' %></div>
    <div class="news-column3"><%= render 'shared/feed' %></div>
    <div class="news-column4"><%= render 'shared/feed' %></div>
    <div class="news-column5"><%= render 'shared/feed' %></div>
<% else %>
...
<% end %>

_feed.html.erb

<% if @feed_items.any? %>
  <%= render :partial => 'shared/feed_item', :collection => @feed_items %>
<% end %>

_feed_item.html.erb

<div class="news">
    <div class="comments">
        <%= wrap(feed_item.content) %>
    </div>
    <div class="stats">
        #Likes, #Comments, #Repins
    </div>
    <div class="points">
    <%= link_to feed_item.user.name, feed_item.user %>
    </div>
    <div class="author">
    Posted <%= time_ago_in_words(feed_item.created_at) %> ago.
    </div>
</div>
<% if current_user?(feed_item.user) %>
  <div>
    <%= link_to "delete", feed_item, :method => :delete,
                                     :confirm => "You sure?",
                                     :title => feed_item.content %>
  </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-29T21:58:50+00:00Added an answer on May 29, 2026 at 9:58 pm

    Ryan Bates has shown you how to do this here:

    as a summary here is the code:

    <table>
    <% @tasks.in_groups_of(5, false) do |row_tasks| %>
      <tr>
        <% for task in row_tasks %>
          <td><%= task.name %></td>
        <% end %>
      </tr>
    <% end %>
    </table>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am just new to programming in Unix and have a small issue that
I'm new to silverlight and wpf programming I've just created a simple storyboard in
i been thinking of a new programming language. Before trying to implement it i
I'm a designer and brand new to programming. I have just opened my localhost
I am entirely new to learning programming, and my father recommended this site to
I am new to parallel programming. I researched a lot about using MPI and
I'm super new to programming and I've been using appengine to help me learn
I'm new to audio programming so excuse me if I'm not using the right
I just started with OOP on Javascript. I am new to programming world. Could
What features could be added to a new programming language to make it more

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.