After using Ruby on Rails 5 I do not want to go back, I’ve fell in love. In my opinion this was one of the best updates in software. My congratulations to the core team and all the contributors.
Bcrypt gem is included and it is not necessary the old manual configuration steps which spares a lot of time and makes us focused on other important things.
In some commands the old rake is gone, such as:
rails db:migrate rails test
To build the API:
rails new tasks --api
Then you add this code to the Gemfile
After, you create this file and write the code that follows
ActiveModel::Serializer.config.adapter = :json_api
Run this command to update the gems
Create both Users and Todos using scaffold
rails generate scaffold User email
rails g scaffold Todo title completed:boolean order:integer category:string user:references
The scaffold option makes a lot of things for us but there is more work to do, some configuration, more code and in my case I added authentication.
The code can be checked in my github through the following link: https://github.com/Adnilson/tasks