Articles

  1. Understanding Routes with Routing Navigator

    Rick Olson’s released a Routing Navigator plugin to help understand how the Rails routing system works for your application (note: it only supports edge rails, not v1.1.2). To test it out: Create a new rails application$ rails routingtest Install edge rails into vendor$ cd routingtest$ rake rails:freeze:edge Install the routing navigator plugin$ script/plugin source http://svn.techno-weenie.net/projects/plugins$ […]

  2. Insta-block with Symbol#to_proc

    Something that might have slipped your radar in your Ruby readings is Symbol#to_proc, something that’s been in Rails since 0.14.4. Using this nice little tidbit of Ruby tricky you can simplify code such as: articles.collect { |a| a.title } articles.sort { |a| a.created_at } to articles.collect(&:title) articles.sort(&:created_at) …and just in case you’re wondering why &:ruby_is_the_new_black […]

  3. DRY your Migrations

    Use Ruby’s method_missing madness to add some DRY to your ActiveRecord migrations. Rails 1.1 introduced Object#with_options which allows you to remove duplication for method calls with common options, but wouldn’t it be nice if we could use this in migrations too…

  4. Building blocks for a CMS

    Though there’s been a few attempts at creating high-level, pluggable components in Rails, nothing has really seemed to catch on. There’s Rails engines and some full-blown CMS packages, but there’s still a tendency to built things from the ground up. Why is this? I’ll list a few low-level tools that you can integrate into any […]

  5. Reducing HTTP Requests: An idea for a plugin

    Cal Henderson from Flickr recently posted Serving Javascript Fast, where he talks about the approach they use at Flickr to reduce the number of HTTP requests per page and efficiently propagating new changes to assets. In Rails 1.1 we get the propagation of changed assets for free: all URLs to static assets (javascripts, stylsheets, images) […]

  6. Extracting Rails code

    Ryan Carson has published his latest interview with Rails creator: David Heinemeier Hansson, where David mentions, amongst other things, that good frameworks should be extractions and not just abstractions. This isn’t exactly the first time he’s mentioned it, but you might find it interesting to note that he singled out Rails components as being an […]

  7. Another Rails blogger

    Hi I’m Tim Lucas and I’ve joined the team here at Sitepoint to keep you up-to-date with what’s going on in Rails land. I come from a software development and usability background, a similar mix from where Rails started, and since hopping on the Rails train over 15 months ago I’ve developed a number of […]