Category Archives: Ruby

Rails 2.0 and link_to_remote :with

I’m moving an old app to Rails 2.0 and other than fixing some routes Ajax calls with link_to_remote and the :with parameter was the only thing that gave me some trouble. In the old version I was grabbing the current value of a drop down list with Prototype and passing it along using :with like [...]

Rails: cleaner partials in forms

Damian pointed me to the patch ELC Technologies committed to Rails.
As he mentions previously you did something like
<% form_for(@client) do |f| %>
<%= render :partial => ‘form’, :locals => {:f => f} %>
<%= submit_tag ‘Create’ %>
<% end %>
but now you can just do…
<% form_for(@client) do |f| %>
[...]

Hacking attachment_fu to work with Flash/Flex uploads and crop square images

Rick Olson’s attachment_fu is my favorite file upload plug-in because let’s you use three different image manipulation tools [rmagick, mini-magick, image science] and storage options [file system, database, amazon s3]. However it doesn’t yet support two features I use on every CMS I build, Flash/Flex file upload (images will upload but won’t be resized) and [...]

Rails 2.0 is go

Tons of new stuff, my favorite is Cookie store sessions

The default session store in Rails 2.0 is now a cookie-based one. That means sessions are no longer stored on the file system or in the database, but kept by the client in a hashed form that can’t be forged. This makes it not only a [...]

Two new ways to load data into Flash

SWX Ruby is a port of SWX (originaly PHP), which claims to be “Ruby’s fastest library for exchanging data with Flash” I haven’t tried it because it doesn’t yet support Flash player 9 but I wouldn’t doubt it’s the fastest as many other methods aren’t too speedy (Although RubyAMF is much quicker lately).
as3yaml, you guessed [...]

Want a job working with Flex and Rails?

Jobs that combine Flex and Rails don’t come down the pike too often. Even more rare is one from a start up with a lot of buzz like Blist.
Speaking of pikes the job is in Seattle so all you Northwest Flex/Railers send in your resume and the solution to Blist’s programming challenge.

Without using any built [...]

Reduce your Rails RAM Usage with MiniMagick

If your Rails app uses Rmagick to resize images on shared hosting you may have had your app shut down because of a RAM spikes (the spike can be > 40mb when processing an image > 2mb).
MiniMagick to the rescue!
MiniMagick accesses ImageMagick directly, similar to exec(’my ImageMagick command’); in PHP. Since shared hosts are looking [...]

Merbivore

Merb gets a slick new site.

The ruby logo contest winner has been announced

and it’s not me

Part of the brief was the ability to print at small sizes and to work in black and white, it might be sour grapes coming through, but I don’t think the winner would hold up. The ruby masses don’t seem too pleased…
Update: actually I know why I lost my logo [...]

RubyAMF is 1.0

RubyAMF now can be used as a Rails plugin or you can run it as a Mongrel process. There’s a nice screencast on Rails integration here.
The one-man RubyAMF show that is Aaron Smith also has a Super Simple Remoting class to get you up and running super simply.
Ruby has gone from no AMF support to [...]