Ruby on Rails + Yahoo! Widgets

After attending OSCON session on Yahoo! Widgets by Jeffrey McManus, I decided I would try to write a widget which connected to Ruby on Rails. First, the Yahoo! Widget (aka Konfabulator) app is located here and the developer documentation is located here. Second, to save time, I simply modified the Depot code from the excellent Agile Web Development with Rails (I hope Dave and David don’t mind). You will need to first download the code for the book and extract the depot_final project (and setup your database, etc). Then you can download my code here and clobber admin_controller.rb with my version, then add shipping.rxml in the views/admin subdirectory. Finally, the JavaScript source code for the widget is located in SimpleDemo.widget/Contents/SimpleDemo.kon file (you might need to rename SimpleDemo.widget to SimpleDemo.widget.zip to unzip it and view the source). It should be pretty easy to understand as I’ve commented it well.