Rails of Fury
a simple man :: on a mission
a simple man :: on a mission
Aug 17th
It’s not like we really need a new rails plugin, but this one I really saw the need for. Tabbed interfaces can really improve how your website looks and flows. Here’s a great article from smashingmagazine about how, when and why to use tabbed interfaces. Here’s a quick rundown of the plugin. Let me know what you think!
TabbedInterface
Build a tabbed interface very easily. Requires Prototype.
see a working example at http://tab-interface.heroku.com Install
./script/plugin install git://github.com/jondruse/tabbed_interface.git
Move the ajax-loader.gif from the resources folder to your public images folder, or go make one at http://www.ajaxload.info/. Whatever you do, just make sure you call it ajax-loader.gif.
An example More >
Jun 25th
Have you ever spent hours coding up the most awesome form you’ve ever seen only to have Rails break it with it’s error markup? I have, and it really sucks. So today I set out on a mission to solve this ever annoying problem. Here’s how I did it.
Step 1. Find the source.
If you’ve ever gone looking through Rails source, you know this wasn’t a very easy thing to do. But after some digging I found what was causing me so much grief.
# active_record_helper.rb in action_pack/action_view/helpers @@field_error_proc = Proc.new{ |html_tag, instance| "<div class=\"fieldWithErrors\">#{html_tag}</div>" }Step 2. Figure out what you want.
I found that the problem More >
Jun 22nd
Here’s a neat trick. It’s pretty simple but really helpful.
Problem: You’re always setting up the same stuff in every controller. Layouts, helper methods and so on.
Solution: Set up your own controller to inherit from.
Throw this into a new file in the controllers folder called base_controller.rb.
class BaseController < ApplicationController layout "base" helper :my_cool_helper endNow take any controller and change the first line like below. Now anything in BaseController you get for free. So in the example below, PostsController’s layout will be “base” and will have the MyCoolHelper included also.
class PostsController < BaseController def list end endWow, that was easy. Now it’s More >
Jun 1st
A couple months ago I found Priit Haamer’s blog post about the Ruby Dictionary for Mac OS X. So now I’ve ported the Git Documentation to Dictionary.app also. Please let me know of any bugs. Enjoy!
Download