Category Archives: Ruby on Rails

Active Record Associations Added to WebORB for Rails

It’s late and I’m lazy so I’m going to to do a copy and paste job (my favorite kind), from the Midnight Coders blog:
We’ve recently added a new feature to WebORB that allows native serialization of associations within active record models. This has been requested several times and now allows you to do things like [...]

Flash Remoting for Rails Tutorial 2 – Data Swings Both Ways

In the first tutorial I showed how easy it is to pass data from Ruby on Rails to Flash via Flash Remoting, this tutorial will show that sending data objects back to Rails is just as simple. Backpack was one of the first apps to get people excited by Rails, I’ll be ripping off their [...]

Build Flex on OS X with TextMate

Since Adobe decided to ignore us Mac stiffs – not like I’ve ever done anything for ‘em, I’ve only been buying Photoshop since version 3 – I’ve made my own quasi Flex work-flow with “the missing editor for OS X” TextMate.
BTW Photoshop 3 introduced layers which was their greatest innovation until Flex 2.0
Okay [...]

Flash Remoting for Rails Tutorial

Ever since I’ve been using Rails I’ve missed one important tool from my webdev toolbox, Flash Remoting. I’ve been getting by with XML but it’s just not the same and it changes the way you approach things ("If all you have is a hammer everything looks like a nail"). Remoting can pass objects, arrays, strings [...]

Flash Remoting for Rails!

My flash nerd dreams have come true! Midnight Coders have released WebORB for Rails.
There’s been a couple false starts with people trying to make remoting work with rails thankfully a company with lots of remoting experience took up the challenge (and passed with flying colors, AMF0 and AMF3 support all for free).

Rails validation make sure your user passwords are strong

Most user created passwords are astoundingly weak (’12345′, ‘mypass’). How do you make them stronger? Don’t give them a choice!
Here’s how to validate a password in RoR to make sure it’s strong using a regular expression (regex).
In your model add a custom validate method (after the regular validation) that adds an error unless the password [...]

Rails StringIO File Upload

# UPDATE
It turns out the method below works unless your file is below a certain file size (which I haven’t figured out yet but it’s around 15k). If your file is too small it will be StringIO not a Tempfile. So how do we check it then? By the file size, if it’s 0 then [...]