public
Description: A resourceful plugin providing lightweight blog functionality to Rails applications
Homepage:
Clone URL: git://github.com/vigetlabs/bloget.git
Clinton R. Nixon (author)
Fri Jan 23 14:09:00 -0800 2009
commit  bda0a3bdabd13f92a311946a74122a9fe8a6a58b
tree    a264edce637a7d9d2763d48d72e95af78b073e48
parent  9729f14a7b6720b22d5ca75a2d34bb0933d00c35
bloget /
name age message
file CHANGELOG Fri Jul 18 13:45:59 -0700 2008 first commit [crnixon]
file MIT-LICENSE Fri Jul 18 13:45:59 -0700 2008 first commit [crnixon]
file README.rdoc Fri Jan 23 14:09:00 -0800 2009 Removed hilarious old doc about Edge Rails [Clinton R. Nixon]
file Rakefile Fri Jul 18 13:45:59 -0700 2008 first commit [crnixon]
directory generators/ Fri Jan 23 13:58:52 -0800 2009 Removed aasm; fixed tests [Clinton R. Nixon]
file init.rb Fri Jul 18 13:45:59 -0700 2008 first commit [crnixon]
file install.rb Mon Jul 21 07:36:44 -0700 2008 fixed install.rb [crnixon]
directory lib/ Fri Jan 23 14:06:50 -0800 2009 Reduced intrusion into the user model [Clinton R. Nixon]
directory tasks/ Fri Jan 23 13:58:52 -0800 2009 Removed aasm; fixed tests [Clinton R. Nixon]
directory test/ Fri Jul 18 13:45:59 -0700 2008 first commit [crnixon]
file uninstall.rb Fri Jul 18 13:45:59 -0700 2008 first commit [crnixon]
README.rdoc

Bloget

(rhymes with blasé)

Bloget is a plugin application that gives you a simple weblog.

When you install Bloget, some lightweight controllers, models, and views will be copied into your Rails application. You will most likely override things in these models and controllers and edit these views.

Bloget uses polymorphic associations for its idea of a poster, or an object that can make weblog posts and comments. This is so you can easily integrate it into your application.

Requirements

Other plugins

Bloget does not require any other plugins. However, some are useful.

You need some way to handle authentication. The RESTful Authentication plugin will work for this seamlessly. If you use something else, you must define the methods +logged_in?+ and current_user in ApplicationController. current_user must return an object that can match up with Bloget’s poster object.

The Will Paginate plugin is also not necessary, but very useful. Bloget will detect it and paginate.

Integration

Integrating with a user model or other posting-enabled model

In your model:

    include Bloget::Models::Poster

Templates

By default, the controllers specify a layout of "bloget," which is installed with Bloget. You can override this in the copied controllers.

This layout references +bloget.css+, which is installed in your +public/stylesheets+ directory.

Routes

You will need to add these routes, or routes like them, to +config/routes.rb+:

    map.resources :posts do |post|
      post.resources :comments
    end

If you would like to show your posts at the URL ’/blog’, you may want to add the following routes:

    map.with_options :controller => 'posts', :conditions => {:method => :get} do |bloget|
      bloget.blog '/blog', :action => 'index'
      bloget.formatted_blog '/blog.:format', :action => 'index'
    end

Copyright © 2007-2008 Clinton R. Nixon of Viget Labs, released under the MIT license