Rails api by Ilja

should I merge this stuff?