Readability of text using odyssey

When you are writing something like article, text, document etc you are focusing on readability. If you are not then you should. As readability influence how a reader can read and understand the content, how you are presenting the content etc. It would also influence how much likely one is to share your article as…

to_json vs as_json in Rails API

Recently we have been working on Rails API. During that time, we were curious about the difference between as_json and to_json. In this article, we are sharing the difference we learned. to_json in Rails API Let’s discuss how we started out building our APIs using ‘to_json’. to_json will return JSON string representing the hash. Option…

Setup your rails application with one command

Generally setting up a rails app is running some same set of commands, for example installing gem, creating database, loading schema and start rails server.

We can create a script and run it to setup our application since Rails 4.2 a bin/setup file is generated by default. Here is the example of setup script.

Authorization with Pundit gem

  Security is an important aspect of application development. Two main components of security are Authentication (Who are you?) and Authorization (are you supposed to be here?). Authentication verifies the user’s identity while authorization verifies whether that user has access rights on certain resources to perform actions on them. Two popular gems for authorization in…