Relax Rails dependency and depend on railties instead of rails itself

The Railties API hasn't changed between Rails 3 and 4, so the dependency can be made compatible with Rails 4 as well. Also changed it to depend on `railties` instead of `rails` itself.