[ANN] Resotolog-1.2 - RESTful blog example (was Community re

On 8/2/06, Alisdair McDiarmid <[email protected]…> wrote:

Here you go:

Hi guys,
i modified a little the original Alisdair McDiarmid’s sources and
created very simple blog system. So the announce follows:

Restolog - RESTful blog example

Very simple blog system based on REST/CRUD ideas. Sources (all credits
going to the autors, i just combined their work):

The purpose is mostly proof of concept, not typo/mephisto etc.


  • ruby-1.8.4 (i’m using mongrel, do you? :wink: )
  • sqlite3
  • edge rails


  • Pretty CRUDed - using only standard action names
  • tags taxonomy - more flexible than categories
  • graceful delete degradation - you can delete without JS enabled
  • Multiuser:
    • only logged in users can post
    • user can delete only his own articles
    • user can delete only comments to his own articles
    • ‘admin’ user can delete everything
    • only ‘admin’ user can delete tags
  • blogs per tag ( /tags/? )
  • blogs per user ( /users/? )
  • RSS2.0/Atom feeds with suitable mime-types ( /articles.atom and
    /articles.rss )
  • Some REST services (more will come):
    • all articles ( /articles.xml )
    • specific article ( /articles/?.xml )
    • tags list ( /tags.xml )
    • still missing: users list, create/update (authentication)
      articles, articles per tag and per user, delete (hm, is it good to
      make delete web service at all?)

REST Problems (for me, not in general :wink: ):

  • how to exclude fields from the XML output? For example @users.to_xml
    will include also the password field in the output.
  • how to deal with the action needed authentication - like
    create/update - usual way is to include some token in the URL, but how
    to do it with Rails?


  1. Get the sources
  2. untar if needed
  3. cd to the sources directory
  4. Bind it to the Edge Rails, create the database and start it:

rails freeze_edge
rake migrate

  1. Create the user with login ‘admin’ - power user, can delete
    everybody posts, comments, tags etc. (hm, maybe ‘rake bootstrap’ step
    will be good)
  2. Logout and create usual user
  3. Start posting articles

Still a lot is missing (user management, password change, pagination,
text markup - textile etc.), but I think it’s pretty good starting

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs