Archive for October, 2008

Rails Rumble 2008 App List

Posted on the October 19th, 2008 under programming,Ruby on Rails by

Put together a small list of apps I saw today that are part of the Rails Rumble 2008.

Let me know if I missed any by adding a comment.  Check out – I am sure they will post an official list shortly.

*** The list keeps growing! – Car pooling site – Music artist tracking site, shows latest ablums from artists you like. – Conference organization? – A service that finds the right food for you? – Social language learning – Simple presentations – RSS / Webservices to speach – Political news? – Organize, collect, and share your projects – Pickup game locator – A solution for managing projects from proposal, through build stage, to getting paid. – Delayed email sending? – Music Create / Sharing app – Easily integrate communication services into your app – Blogging app – A program to get your from nothing to running one mile – A social application where you list your games and connect with your friends to play games. – Unknown – A co-operative word game for two or more players – Lists of things you love and hate. – Find a car pool – Build a potato man –  task / GTD app – Web based twitter client – Hiking fan site, find trails – No idea what this is – a wall of randomness? – donation app – Treasuring hunting w/SMS – Track what you eat – online game where you can wager points on real-world events – create, publish, read and rate stories – Keeps track of your citations on books, journals and websites. – pics of your diet (food) – see all the good and bad stuff in the Twitterverse –  say who inspirse you – Lunch recommendations – provides you with tools and motivation to get you out of the red…and back in the black. – Qflip is an app that integrates with the netflix api that helps people to rent randomly. – Its a way to get help with things using your social network. -Latte Art with ratings – An idea incubator. – a stretch reminder – RubyReddo is a service to translate your GetText .po files – Just A F***ing List – Dense is a simple slideshop app – Effortless one-click reminder about pretty much anything – Ostraka is the digital counterpart of ancient democratic instrument of ostracism. – Tagueame is a little experiment about socializing online opinions about your friends and family. – A business related app for project management, time reporting, invoicing with built in chat rooms. – find out who’s got the best prices, and where they are – A service for tracking and sharing debts with friends – The assassin game

Another great list of Rails Rumble 2008 apps  – > – Reveal the Bias

Rails Rumble 2008 has started

Posted on the October 17th, 2008 under Rails Ecommerce Project,Ruby on Rails by

Just an FYI…

Rails Rumble 2008 has started. I am signed up to be a judge, It would be pretty interesting to see what comes out of this 48 hour hack fest.

The Rails Rumble is a 48 hour web application development competition. As a contestant, you get one weekend to design, develop, and deploy the best web property that you can, using the awesome power of Ruby on Rails

Read more about it from their latest blog post: It’s On!

I’ll try to get a list going of the open source projects that come out of this event, and post the git hub links.

Here is the first app from what someone had posted in IRC: – maybe its something to follow?

**** Update

Links to watch:

Ruby On Rails Polymorphic Paperclip Plugin Tutorial

Posted on the October 17th, 2008 under My Projects,programming,Ruby on Rails by

This tutorial is an extension of the paperclip tutorial I put up last week. This time we are going to take advantage of polymorphic paperclip. Polymorphic paperclip utilizes separate tables (an assets table and an attachings table) to track your attachments. This allows for an unlimited number of attachments per item per model. In the first tutorial I showed you how to attach just one item, although you could add more columns to your table to handle additional attachments this way is a lot more flexible. While this plugin is not perfect, there is a lot of room for improvement, its a great starting point. Perhaps a fork is on its way from me…

Project Page:

First things first, lets install the plugin:

script/plugin git://

Lets setup our new migration that is needed. After reading the rdoc, I noticed there was a new generator installed. Great, this makes things even easier. Lets verify that the generator is available for use, first run:


This should produce a list of all generators available for use, my list below might vary from yours depending upon what plugins you have installed…

Installed Generators
  Plugins (vendor/plugins): authenticated, forgot_password, open_id_authentication_tables, paperclip, polymorphic_paperclip, roles, rspec, rspec_controller, rspec_model, rspec_scaffold, upgrade_open_id_authentication_tables
  Builtin: controller, integration_test, mailer, migration, model, observer, plugin, resource, scaffold, session_migration

As you will notice there is a polymorphic_paperclip generator, go ahead an run it as follows:

script/generate polymorphic_paperclip

Before you go and run rake db:migrate, open up the migration and modify the assets_count to attachings_count – it seems there is a minor bug. I notified the author of the plugin and will submit a patch via git. Now its OK to run rake db:migrate

Now we have the migration generated and the tables have been added to your database. Next we have to add (or change if you already have paperclip setup) the model where you want to have attachments by adding acts_as_polymorphic_paperclip. As an example, I posted my documents model below.

class Document < ActiveRecord::Base
# Document Belongs To A User
belongs_to :user
# for paperclip (polymorphic)
# Validations

Note: Ideally I would like to be able to override the styles settings that are set in the plugins assets.rb, however I went ahead and hard coded them there to fit my needs. Example:

class Asset < ActiveRecord::Base
  has_many :attachings, :dependent => :destroy
  has_attached_file :data,
                    :styles => {
                    :thumb=> "100x100#",
                    :small  => "150x150>",
                    :medium => "300x300>",
                    :large =>   "500x500>",
                    :xlarge =>   "600x600>",
                    :xxlarge =>   "800x800>" }

For now, lets move onto the views where you are going to allow attachments. We are just going to have one upload, perhaps in another tutorial we will look at handling multiple uploads.

You need to make sure you put the html => { :multipart => true } in both your edit and new views for the model you are working with. Example in my case:

<% form_for(@document,:html => { :multipart => true }) do |f| %>
  <%= f.error_messages %>
  <%= render :partial => 'form', :locals => { :f => f } %>
<% end %>

Next you need to add the file upload field to your _form or edit/new views.

  Attach a file or image <br />
  <%= f.file_field :data%>

Now lets go ahead and make these attachments viewable in the document. For the edit view I added the following:

<p><%= image_tag asset.url(:medium) %></p>
<p>Tiny:  <%= asset.url(:tiny) %><br />
 Small:  <%= asset.url(:small)%><br />
 Medium:  <%= asset.url(:medium)%><br />
 Large:  <%= asset.url(:large)%><br />
 XL:  <%= asset.url(:xlarge)%><br />
 XXL:  <%= asset.url(:xxlarge)%><br />   
 Original:  <%= asset.url %>

Other Notes:

You can use this to attach an attachment if you were going to use a different view, for example an upload view with @document.assets.attach(@asset)

You can nuke an attachment by either calling @document.assets.detach or @document.assets.detach(@asset) depending upon how you are going about dealing with removing attachments. @document.assets.detach will nuke ALL attachments associated with that document, @document.essay.assets.detach(@asset) will nuke just that asset you are referencing.