Added support for Rails 4 projects.

This might break backwards-compatibility, but it is the only way I found so far to support Rails 4.0.0beta projects.