acts_as_cached is a plugin by Chris Wanstrath, Tim Myrtle, and PJ Hyett that simply allows you to cache any Ruby object in memory (using memcached). Check out the documentation for the full instructions, but if you’ve got a working memcached server ready and waiting, it’s as easy as installing a gem (memcached-client), a plugin (acts_as_cached), and adding ‘acts_as_cached’ to your model.
A few readers have e-mailed in pointing out the new official Ruby site’s design. It’s a great bit of work, but I tend not to post about things that everyone’s almost certainly read somewhere else, and I linked to a preview of the new design some time back. However, I just noticed they’ve mentioned Ruby Inside as one of only four Ruby ‘blogs of note’. As a thanks for this great honor, I realized I should probably post about the site, so go enjoy it. Read More
Richard White quotes an anonymous user of his AJAX scaffolding system for Rails:
I really like Ajax Scaffold but it’s really hard to upgrade when a new version comes out. I usually spend a couple hours diffing all my scaffolds with a newly generated one.
Ryan Daigle writes about resource_feeder, a new plugin for Ruby on Rails that makes the generation of RSS and Atom feeds easy. Like so:
render_rss_feed_for Post.find(:all, :order => ‘created_at DESC’, :limit => 10)
If you want to get playing straight away: Read More
script/plugin install simply_helpful
script/plugin install resource_feeder
The latest version of RadRails, the Ruby on Rails IDE, 0.7.1, has been released for Windows, OS X and Linux. Some fixes to the reliability of starting and stopping servers from the IDE have been made, and some refactoring has taken place. The “Terminal” view has been replaced by a Console view which all generators, rake tasks, plugins, and other scripts outputting to stdout will use. A configuration preferences pane has also been added, making it faster to start new projects. Read More
HAML is a new template language for Ruby on Rails developed by Hampton Catlin, a Canadian Rails developer. It’s a high-level, heavily semantic language that breaks the mold of RHTML and makes it very hard to make markup errors. In a way similar to Python, HAML relies on indentation, which it uses to enforce DOM hierarchy.
Here’s an example of some HAML code in action:
%title Client Admin Site
= stylesheet_link_tag ‘tabbed’
%strong Admin Interface
.menu= link_to ‘logout’,
:controller =’account’, :action =’logout’
%li= link_to ‘Member Approval’, member_admin_url
%li= link_to ‘User Management’, user_admin_url,
%li= link_to ‘Pages’, page_admin_url
%li= link_to ‘Reports’, reports_url
%li= link_to ‘Help’, ‘/’
//These will only render if there is
a non-false value returned from the helper
#sidebar= @content_for_sidebar || false
%p= “Copyright Hampton Catlin 2006″
GeekUp is a community of developers in the North-West of England (a fine place by any measure) and they’ve put together a FREE, one-day mini conference about Ruby and Rails in Manchester. The event is limited to 40 people and is aimed at newcomers to Ruby and Rails. (If you’re wondering how to get there, take t’buzz to top o’hill ‘n than walk down’t'other side.) Read More
Peter Armstrong has just released the initial version of his PDF-only book, Flexible Rails. It’s available for $20, and anyone who buys the book now will get free PDF copies of every subsequent version of the first edition of the book. You can also order the book in 5 copy, 10 copy, and 30 copy editions for use in the workplace.
The book is at 214 pages and Peter claims is only 20-40% complete so far. Despite this, the current table of contents includes:
Overviews of Rails 1.1, Flex 2, Flash 9, and how they all work together
How to install everything
Creating an initial ‘hello world’ project
Flex login systems
Sending XML with HTTPService
Creating a basic GUI with MXML
Getting tasks to show up in the task grid
Looks like it could become the guide for those interested in the interoperability of Rails and Flex. Read More
Chris Wanstrath has put together a ‘mix tape’ of useful tips and tricks for irb and Rails’ script/console. Some great bits and pieces in there, and people are leaving even more tricks and tips in the comments! Read More
Thomas Enebo and Charles Nutter have put together an online video and slide presentation along with InfoQ about JRuby. As the guys talk about Ruby and JRuby in the video, the slides underneath automatically update with their slides and code examples. Excellent, and especially excellent if you want to learn about what they’re up to with JRuby. Read More
Chronic is a natural language (English only, at present, I think) time and date parser written entirely in Ruby. It supports a staggering number of different ways of expressing the date and time. For example:
this monday 07:30
yesterday at 9:00
tomorrow at 11pm
wednesday last week
Time.parse already does a great job, but this goes a step further. You can install chronic quickly with gem install chronic. Read More
Charles Nutter, one of the developers of JRuby, a Ruby implemention running on the JVM, has announced that he and Thomas Enebo are becoming Sun Microsystems employees later this month with the responsibility of working on JRuby full-time!
The primary goal is to give JRuby the attention it really needs. The potential for Ruby on the JVM has not escaped notice at Sun, and so we’ll be focusing on making JRuby as complete, performant, and solid as possible. We’ll then proceed on to help build out broader tool support for Ruby, answering calls by many in the industry for a “better” or “smarter” Ruby development experience. Read More
Mike Potter of Adobe has posted an announcement of the release of a Ruby on Rails SDK for developing ‘Rich Internet Applications’ using Rails and Adobe’s technologies. The code has been made available on Google’s Developer Network.
The SDK includes four samples: a ‘directory explorer’, an ‘issue tracker’, a file transfer demo, and a ‘send data’ demo (appears to be a way to pipe file data from Rails into a Flex app). Derek Wischusen of the Flex on Rails blog has some more info. Read More