ryanstout / blog_kit

A plugin to add a blog to a rails app that should exist but didn't until now
http://www.agileproductions.com/blog_posts/4-BlogKit-a-Plugin-to-Add-a-Blog-to-your-Rails-App
MIT License
144 stars 14 forks source link

Add option to [Read More] on main page, and truncation limit #4

Open ryanstout opened 14 years ago

berkes commented 14 years ago

Quick way, that I use, is a different partial for teaser-mode: _blog_post.html.erb used for full view, blog_teaser.html.erb for partial-view. In fact, this would eliminate the _blog_post.html.erb alltogether, since that is used only in "show" and could therefore live in show alltogether. It also remove the need for some if-statements (like wether or not to show comments) in the partial: making the partial a lot cleaner.