Learning how to create an API using rails