Tumblelog, the roar demo

posted on February 22nd by wayne

I wanted an app to showcase some of Roar’s capabilities, so I put up a tumblelog.

One of the things it highlights is the ability to break out of the admin backend and easily edit resources in place. If there’s interest, I might go into a more detailed walkthrough of building this app. In the meantime, grab the source, check it out, and let me know if there are any questions.

Getting started:

Download from rubyforge

Create a database (mysqladmin create tumblelog_development), or edit database.yml to suit, run rake db:migrate, and start the application with ruby ./script/server.

Update: I find it rather amusing that the day I put up a tumblelog as a technology demo, I find tumblr, a pretty nifty (and free!) tumblelog provider. If anyone is actually expecting that this tumblelog software will do anything useful… don’t! If you want a tumblelog, go to tumblr.

Comments

On 23 Feb 13:24
Akhil Bansal said:

I will surely give it a try. Seems similar to streamlined plugin, isn't it?
On 23 Feb 13:55
Wayne Larsen said:

The simple answer to that question is yes, it is similar to the streamlined plugin. The longer answer is that while some of the capabilities overlap, the approach and philosophy are quite different. I plan to write about where I'm coming from and why with this plugin soon.
On 25 Feb 11:32
Rahsun McAfee said:

So far I think it's AWESOME! Keep up the good work. I had a test Admin up in minutes. I can see the Rails community benefiting from something like this for sure. This feels better then the streamlined plug in. I can see the Django influences as well. Suggestions: 1) I don't know if I'm doing something wrong, but search filter is giving me some sort of "has_key?" method not found error. 2) It should be pointed out to add map.roar "controller" to routes. It may have been mentioned I just missed it.
On 25 Feb 16:29
Wayne Larsen said:

Thanks Rahsun, 1. I've made changes to the search filter, so if you're looking at the docs, they are probably wrong. The search parameter takes a symbol and an options hash as parameters, and there must be a :fields key in the options. For example:

search :text, :fields => [:title, :body]
2. I'm sure you're right about the documentation not pointing this out. The truth is it isn't strictly necessary to do so. Basically, there are three ways to enable roar: 1) with a subdomain, 2) through a prefix, or 3) with a bare controller. Only with option 2 is map.roar required (and is simply a shortcut). But it is certainly the simplest (and probably the default case), so it should be mentioned more prominently. Cheers
On 25 Feb 16:30
Wayne Larsen said:

Hmm, seems I need to fix my comment formatting.
On 02 Mar 20:35
Alex Lebedev said:

Great tool, guys! Thanks to you Rails finally starts getting something similar to Django admin applicationn. I stated using Roar in my current project. Impressions are positive so far. Will report with more detail later.
On 03 Mar 05:51
Bojan Mihelac said:

When demo is installed _users_ table is empty, so to login fast with demo:demo add user to database:
INSERT INTO `users` ( `id` , `login` , `name` , `email` , `crypted_password` , `salt` , `created_at` , `updated_at` , `remember_token` , `remember_token_expires_at` )
VALUES (
NULL , 'demo', 'demo', 'demo@example.com', '923efc05c1e257233e1b11431804e681a01c9113', 'demo', '2007-03-03 11:48:17', '2007-03-03 11:48:17', NULL , NULL
);
On 07 Mar 13:22
Brendon Davidson said:

This is awesome. I've checked out goldberg, ajax_scaffold/mooey, and hobo before this and this definitely makes the most sense imho. I do have a question though... I have a db table called listings which has a user_id to associate it with the user who created it. I do not want user_id to be editable on the form, but I want it to display the user's name and automatically associate that user with the new listing. Assuming I have a function current_user that returns the user object for the currently logged in user, what is the best way to go about this? Hope that was clear. Thanks in advance.
On 08 Mar 05:49
Wayne Larsen said:

Brendon, thanks for the feedback.

You want the user_id for the listing to be set to the currently logged in user? If so, you can do that through your model. Use a before_create callback to set the user, or see Userstamp for a plugin that does this for you.

You can easily display the user’s name in the table by using a column definition in your table:
column "user.name" 

Hope that helps.

What is Roar?

Roar is a plugin for Ruby on Rails that provides an automated admin interface for resources. It provides non intrusive and degradable ajax based CRUD, relationship editing, advanced widgets and more.

Resources

Feeds

Copyright © 2006 - 2007 Nanoware.