jipiboily / monologue

Monologue is a basic blogging engine. It is a Rails mountable engine you can mount in your already existing Rails app, or a in a new one! Enjoy.

Home Page:http://jipiboily.com/2013/monologue-0-3-0-released-and-monologue-markdown

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

availables methods/actions available with the @posts

katawura opened this issue · comments

l am trying to pull the first post using below:

      <%= @posts.first do |post|%>
      <div class="large-6">
           <div class="article-out">
           <div class="figure"><img src="<%= asset_path( 'banner-med-07.jpg' ) %>" alt="Banner" /></div>

           <div class="aside">
           <h3><a href="#"><% post.title %></a></h3>
           <p>Edited by <% post.user.name %></p>
           <% link_to t("See Editorial"), post.full_url, class: "see-link" %>         
           </div>

           <div class="date-out">
           <div class="date-txt"><% post.published_at.to_date.day %></div>
           <div class="month-txt"><% post.published_at.to_date.strftime("%b") %>/<% post.published_at.to_date.strftime("%y")  %></div>
           </div>
           </div>
      </div> 
      <% end %>

But doesn't seem to pass please can you advise on the methods availble please?

<%= @posts.first do |post|%>
this looks weird to me
propably should be sthg like <%post = @posts.first%> or sthg similar?

What do you mean with But doesn't seem to pass?

It was not showing anything in my view. l stopped looping it and it worked for me. cheers