Ruby in Rails

Ruby, Rails, Ruby on Rails Tutorials

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

Ruby reduce method usage example

Reduce method can be used to reduce a set of values to a single number / variable by performing some operation on an individual element. If unaware, you may end up using iterations

Akshay Mohite Akshay Mohite 5 min read

Rails first_or_create vs find_or_create_by on ActiveRecord

Rails ActiveRecord provides methods like first_or_create, find_or_create_by methods to insert data based on certain conditions or create new records. We need to understand difference between first_or_create and find_or_create_by to use them as per

Akshay Mohite Akshay Mohite 3 min read

Rails try hash key access

Rails ActiveSupport provides try method on an object. Try is used to call a method on an object if it is not nil, otherwise return nil. Try method also be used on a

Akshay Mohite Akshay Mohite 3 min read

Rails + React JS application with CRUD operation

Setting up Rails application with ReactJS usually takes some time. Setting up React Router and Redux for Front-end is an essential part of using React with Ruby on Rails.

Akshay Mohite Akshay Mohite 22 min read

Rails Routes expanded view option

Listing rails routes and interpreting is quite troublesome if you are using a small screen on terminal. Rails 6 adds support to show rails routes in an expanded format with --expanded option.

Akshay Mohite Akshay Mohite 3 min read

Rails find_in_batches vs find_each

Often, we come across querying in batches to fetch records through ActiveRecord in Rails. This article discusses how we can use find_in_batches and find_each to query records in batches with ActiveRecord.

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

Subscribe to Ruby in Rails

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