switch to rails-api