Problem in Getting Records one by one

Hi All,

Here is the code I am using

<%= periodically_call_remote :update => “news_div”, :url => { :action =>
“get_news”}, :frequency => “5” %>

this is my method get_news

def get_news
@news = News.find(:all, :conditions => [“status => ?”, “Active”],
:order
=> “created_at DESC”, :limit => 5)
end

/views

<% for news in @news %>
<%= news.title %>
<% end %>

I want results to be displayed one by one not all at a time. What to do?
I
am stuck here, please help.


Thanks and Regards


Puneet Pandey
Ruby on Rails Developer

In Puneet’s Lab: http://www.puneetpandey.com

I don’t know the correct solution. But you are fetching 5 records,
therefore, it will display all of them. You can use javascript effects
to
generate some effects or fetch 1 record at a time.

BTW, hope you know that some new items may not be displayed if rate of
generation of new news items is more than the limit in your find
condition
(ie, 5)

Thanks,
Abhinav

अभिनव
http://twitter.com/abhinav