nirosh wrote:
> i have a poem model. i need to display the most viewed poems.
> is there any plug inns out there to do this?

Unless I'm missing something obvious, I wouldn't think a plugin would be 
needed for this.

poems_controller.rb
--------------------
def show
  @poem = Poem.find(params[:id])
  @poem.increment!(:view_count)
  ...
  ...
end

http://railsapi.com/doc/rails-v2.3.8/classes/ActiveRecord/Base.html#M001117
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to