Hello Merb

1 Jan 2009 In: engines, radiant, rails, railsconf

Merb is getting merged into Ruby on Rails. Together they will become Rails 3, as announced by David Heinemeier Hansson here and Yehuda Katz here.

I wish I could claim to have been playing with Merb for a while and have some real insight into the framework, but to be honest, I haven’t. I still think this a very interesting news, though, and in my opinion this can only be good news for the Rails community. Already, the brilliant Merb guys are optimizing and improving Rails, for instance this 8% speed boost in using respond_to.

So, how can we expect the the merge to affect the Rails framework we know and love? Let’s peek into the possibilities of combining these two frameworks.

Read the rest of this entry »

Christmas greetings from a happy boy

22 Dec 2008 In: other

Dear friends and clients, business associates and regular blog readers.

Thank you for helping me out, thank you for doing business with me, and thank you for following my ramblings. Let’s do it all again next year!

Now that I’ve had some time to experience self-employment on my own, I’ve come to realize that there are many similarities between being an entrepreneur and being a nissemand. Both is hard, but when and if you reach the happy ending, everything will be good. As a Christmas greeting especially for you, I’ve recorded a song about just that :)

I wish you a merry Christmas and a happy New Year!

All the best,
Casper

Removing Rails validations with metaprogramming

6 Dec 2008 In: radiant, rails

I recently found myself facing a metaprogramming challenge. I solved it by combining two terrible ugly hacks, and as such I won’t say I found a solution that is anywhere near to be elegant.

My problem was this: I was developing a Radiant extension called tags_multi_site, which allows the tags extension to play nice with the multi_site extension. This required me to scope all tags within a site, so that tags with the same name could exist in different sites, but in the same physical database table.

The tags extension has this validation:

class MetaTag < ActiveRecord::Base
  validates_uniqueness_of :name, :case_sensitive => false
end

I needed to add :scope => :site_id, but I couldn’t touch the code of tags extension itself, since that would terribly un-DRY and not reusable for anyone else. I had to either modify the existing validation programmatically from my own extension or to remove it and add my own.

Read the rest of this entry »

Need a web developer?

Hello, I'm Casper Fabricius. I have developed for the web for 8 years, and have been enjoying Ruby on Rails for the past 3.

My experience covers communities, shopping solutions, multi-language sites, heavy back-end lifting and a wide selection of more traditional websites. I currently favor Radiant CMS as a platform, and I am an expert Radiant extension developer.

I am based in Copenhagen, Denmark, but I take assignments from across the globe. Feel free to study my resumé, featured projects and - of course - to hire me.