Category Archives: Ruby

Rock and Roll Ruby on Rails ….

Ruby Development Toolkit for Eclipse IDE | RDT

I’ve been looking into Ruby and Rails recently since I deployed Redmine at my company to support our software development projects. For those who don’t know Redmine, this is a great piece of open-source software, offering a complete web collaborative solution for project management including source control, wiki, issues tracking, ldap authentication… Today, I just […]

What's new in Rails 2.1?

If you want to know what’s new in Rails 2.1 or think that you may have missed a new feature, you should check out the e-book “Ruby on Rails 2.1. What’s new?“. There are all new features described with an example. It’s quite amazing to see how rails evolves. btw: did you know that there […]

I love HAML

Just a quick post to let everybody know that i’m switching my erb templates over to HAML. All my css with SASS will follow. These two template engines enhance my productivity a lot. it’s compatible with rails 2. I must admit that there are still some issues like: No ruby code on multiple lines to […]

Rounded div corners with Ruby on Rails

So now you know how to do nicely rounded div corners without using images or any javascript after reading this post. But how do we integrate this nicely into our rails app? The following solution might not be perfect but that’s what i’m using and like:

automatically strip attributes of an ActiveRecord model

You know the situation when some users add a couple of whitespaces to the front or/and the end of a value they just entered into your application? Yeah, and in most cases we dont really want those blanks in our data. But on the other hand we can not really blame them because sometimes it […]

Want to show your source code to someone else?

Today i stumbled across a nice tool called Pastie. Pastie helps you if you want to show some bits of your source code to someone else. e.g. you need some help, advice (or you just want to show off with your code). You paste an excerpt of your code and pastie saves it for under […]

Bulk testing your model attributes with rails

When it comes to testing in Ruby on Rails I tend to test every piece of its public interface. This means I test every single public method and attribute to ensure my desired functionality. Recently I’ve updated my application from Rails 1.2.5 to 2.0.1 and I was happy to have tests. None of them failed […]

Extended Email validation for all your models (validates_email)

Ruby on Rails ships with a lot of predefined validations for your models. Unfortunately there is no special email validation. Even Rails 2.0 does not ship it (check the ActiveRecord changelog) yet. Because I needed it I had to write my own validates_email method. I know there are a lot of plugins but non of […]