Ruby in Rails
  • Home
  • Rails
  • Ruby
  • About
GitHub icon LinkedIn icon
Subscribe

Rails

A collection of 87 posts

Rails

Rails building json API responses with JBuilder

Rails is a MVC web application framework which supports building complex websites without writing any APIs. But, client side libraries are evolving at brisk pace with wide-spread use of React JS, AngularJS, VuJS

Akshay Mohite Akshay Mohite 9 min read
Rails

Rails adds before? after? methods on date time classes

Rails Date, DateTime, Time, TimeWithZone class objects could be compared using less than, greater than signs. Rails added methods before? and after? to compare objects of these datetime classes.

Akshay Mohite Akshay Mohite 1 min read
Rails

Rails Range cover? includes? methods support Range argument

Rails CompareWithRange core extension adds support of Range as an argument to Range#===, Range#cover? and Range#includes? methods. Ruby already has support for these three methods, but ruby does not support Range value as

Akshay Mohite Akshay Mohite 2 min read
Rails

Rails skip_before_action callback ignores conditional

Before action callback in Rails has support to add conditions like if and unless. The callback is executed only if the conditions evaluate to true. But, skip_before_action callback does not support conditionals. In

Akshay Mohite Akshay Mohite 2 min read
Rails

Rails parse date time string in UTC zone

Sometimes we need to parse a date string in UTC timezone in Ruby. Time.parse considers system time zone whereas we might want to parse time in UTC or some other custom timzone. This

Akshay Mohite Akshay Mohite 1 min read
Rails

Rails ActiveSupport adds Enumerable#index_with method

Rails ActiveSupport Enumerable adds index_with method. This method allows creating hash with a value from block passed or default value. This is useful when we want to create a hash and value needs

Akshay Mohite Akshay Mohite 2 min read
« Newer Posts Page 4 of 15 Older Posts »
Ruby in Rails © 2023
Latest Posts Github Twitter LinkedIn

Subscribe to Ruby in Rails

Stay up to date! Get all the latest posts delivered straight to your inbox