Ruby on Rails pt 2

So yesterday, I finished by getting a basic product catalog setup in rails (example from the book “Agile Web Development with Rails”. I couldn’t recommend this book enough for starting out.


Any data validation occurs in the model component of Ruby’s MVC framework. And it’s not that readable. Granted, one line of code does some impressive shit, but “numericality” as a key word?? This example sets cost up as a required field which should be a number greater than 0.

Speaking of readability, you can use regex in validation. I actually prefer this as it allows me to be as specific as possible when validating data. 



So I’ve been working in radrails for about 2 days now and it’s pretty slick. You can start the server directly from the IDE and the formatting controls are awesome. The only issue is that there are no suggestions as I type. For example, in the erb if I type “<%= Time.”, I’d love it to have a drop down suggestion of methods applicable to Time. Eclipse overall does this well – especially in java and since RadRails is an extension of eclipse, why can they do this??

Frustratingly switching to NetBeansIDE now.

Ok – Netbeans is worse. It’s slow, does initial scans before I could continue and it’s wizards seem clunky. Also, it doesn’t do the suggestions like I was hoping it would. After asking my friend Google, I got a recommendation to use RubyMine. Looking that up now.

RubyMine looks awesome. But the beta version of it’s new release which supports rails3 fails on install. The 30 day trial using rails2 works fine, but our project is using rails3. So- back to Aptana I go. I guess that was a learning experience. I’m looking forward to RubyMine 3 though once they get the kinks worked out.

Leave a Reply

Powered by

Up ↑

%d bloggers like this: