Support rails 4.0 and 4.1

Nice. Did not know you could do this.