After months of sticking with Rails 1.1.6, I have finally moved my app to 1.2.3. I’ve been holding off the upgrade because I am using the theme_support plugin by Matt which would break in 1.2.3 because of routing changes. As a consequence, I can’t use ar_mailer because it requires 1.2.x., according to my buddy Evan. Now that I am using a version of the plugin with fixes from Dallas Sliecker, I can move on. Speaking of plugins, here are the ones I used in SchoolPad. You can find more information and SVN locations of these plugins in the Agile Web Development website.
account_location — This plugin supports the account-key-as-subdomain way of identifying scopes in your Rails app. This is useful if you want to give a subdomain, say for a blogging application. Instead of identifying users via the URL ‘http://www.yourapp.com/u/1234’, they can use ‘http://greg.yourapp.com’. This was written by DHH.
acts_as_ordered — I used this plugin because I want to provide a ‘Previous’ and ‘Next’ buttons in the photo display. I initially thought of using pagination with :per_page => 1 but it doesn’t seem right. I then considered acts_as_list but I was too lazy to a write the condition for getting the previous and next records. So I decided to look for a plugin and found acts_as_ordered by Jonathan Viney.
dom_id — If you’re using Ajax, you need a bunch of ID’s in your templates. This plugin uses the class name and frees you from worrying about duplicate HTML ID’s.
file_column — Uploading of files and images is handled by this plugin. It also integrates nicely with RMagick and you can specify sets of dimensions when uploading an image. A lot of people I know use attachment_fu. I haven’t used attachment_fu so I’m not going to compare them. file_column was written by Sebastian Kanthak.
full_error_messages — Rails validation error messages are fine especially when you’re just starting out. But as you improve your application, you will want to have friendlier and more sensible error messages. Instead of your app saying “Start at can’t be blank”, why not “Please include a start date for this event”. This plugin by Pinoy RoR hacker Topher allows you to do that.
http_caching — Every time you have a photo-gallery feature in your app, you are most likely going to need caching. A typical app would store images in non-web-accessible folder for security reasons. Every time there is a request for the photo, you need to read the file and send it back to the browser using ‘send_data’. The problem is you are doing these costly steps every time the image is accessed. This will make your application very slow even if the user only clicked the ‘Back’ button because all the images in your page will be read again. To avoid this re-sending an image, you need to tell the browser that the image has not changed (a ‘302 Not Modified’ response) such that the browser will use the image in the cache, if it is already there. Aside from http_caching, I also experimented with Rails’ fragment caching. This plugin is written by Coda Hale.
simple_access_control — This plugin provides a simple user authorization system. I don’t have a complicated authorization system yet and I only used it to specify some privileged methods for the super_admin (i.e. myself).
theme_suppoprt — Imagine a typical blogging application where you choose the look of your blog and decide if the recent posts are in the left or right sidebar. theme_support allows you to create pre-defined templates that can be assigned to controllers in runtime.
validates_as_email — Guess what this plugin is for🙂