Ruby in Rails

Ruby, Rails, Ruby on Rails Tutorials

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

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

Override Devise Mailer in Rails

The other day, I had to override devise confirmation instructions email. Particularly, subject of the email being sent out from Devise. Devise makes it easy to override subject of the mail, with devise.en.yml

Akshay Mohite Akshay Mohite 3 min read

Override as_json in Rails

When we call as_json on ActiveRecord model object, it returns json of attributes on model by calling as_json. We can override as_json method and add extra attributes, rename keys, add values of methods

Akshay Mohite Akshay Mohite 3 min read
« Newer Posts Page 3 of 23 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