Upgrading to Rails 5.1x

Rails 5.1rolled out with some major changes and features including Yarn and webpack support Dropped JQuery as a default dependency Built-in support for writing system tests using Capybara Encrypted secrets and many more, you can find the detailed release notes here. Recently we upgraded one of our production apps to 5.1x and since we have good test…

How to write your own Rack middleware

Rack is a Ruby package which provides an interface for a web server to communicate with the application. It is very easy to add middleware components between the web server and the app to customize the way your request/response behaves. The middleware component sits between the client and the server, processing inbound requests and outbound…

How to write maintainable routes in rails

config/routes.rb is the gateway to your ruby on rails application. All request send by your users are directed to the appropriate code by the routes. Example:

When someone visits your-website.com/profiles then the request is taken to the Index action of the UsersController. Under that action you will get the index.html.erb. So using routes we…