Peter Marklund har skrivit en artikel om Rails i Informators tidning Format:
Developing with Ruby on Rails is wonderful. I had been dreading implementing versioned objects, which are needed if I want to introduce publicly editable fields. But after a bit of googling I found the acts_as_versioned plugin that does it all for you in one line of code!
class Page < ActiveRecord::Base acts_as_versioned end
The acts_as_versioned at the top of the model class is all that’s needed. It’s so simple it makes you wonder what the catch is, except there is no catch.
This evening I tried to get my test coverage up a bit by making tests of the helper classes using Geoffrey Grosenbach’s Test Your Helpers instructions. But I couldn’t get it to work. Has anyone used it? Does it work? Or is there some other way?
Testing the helpers is the last big thing left to get to the unreachable 100% test coverage. So naturally I want to solve it!
When using apache2 it’s recommended to use fcgid instead of fastcgi. That requires some changes that are not totally obvious, see the end of Claudio Cicali’s How to install Ruby on Rails on Ubuntu 5.10 post if you, like me, can’t figure it out yourself.
I wasn’t there myself but based on David’s Decompressing RailsConf Europe post I wish I had been there. Maybe next year…
It might be because you, like me, have put the following in application.rb:
before_filter :set_content_type def set_content_type @headers["Content-Type"] = "text/html; charset=utf-8" end
Change that to:
And your RJS magic will start to work!
If you like me have seen people mentioning RJS but not understood what it is, Cody Fauser has a good introduction which will make it all crystal clear.
Adam C. Hegedus explains how to do Ajaxed Select Boxes in Rails. There are a few typos in the code snippets but I’m sure you’ll notice them.