Access specifiers in Ruby

This tutorial will discuss how to define Access specifiers in Ruby and what do they mean for classes and modules where they are being used. Default Scope Whenever you define a new method in any class/module the default access specifier that Ruby will use is public. Thus, all methods defined without any scope are public by […]

Profiling Rails Apps with Rack-Mini-Profiler


This tutorial will discuss profiling Ruby on Rails Applications using rack-mini-profiler gem. rack-mini-profiler gem helps finding performance bottlenecks by showing speed badge on every page which can be configured to be displayed in particular environments. E.g. development/staging/production environment. How to Install You can install Rack-Mini-Profiler gem by command - gem install rack-mini-profiler This command will help you install […]

Rails Pluck vs Select and Map/Collect

In Rails, Pluck vs Select can be understood while active record querying. Pluck is used to get array of particular attribute based on particular condition. Same can be obtained using select and then collect on model. This tutorial will help you understand the difference between these ways of collection of specific attribute values. We will […]

Ruby Pass by Value or Reference

Ruby pass by value or reference, which one of them is used when object/variables are passed to the functions. This tutorial will help you understand how passing value/objects in Ruby work. Pass by Value: def test_ruby_function(number) number = 54 puts "Number is:#{number}" end number = 101 # call to method passing number variable test_ruby_function(number) # […]

Rails meta_request gem and Rails Panel

meta_request gem is used with Rails application for profiling and performance improvement. This gem is used with Rails Panel chrome extension. This tutorial will help you understand how to use both for profiling and performance improvement of your Rails Applications. 1. Rails Panel To begin with you need to install Chrome Extension Rails Panel first. […]

Integrate awesome_print with Rails Console

Integrate awesome_print with Rails Console and Interactive Ruby - awesome_print is code beautifying library available for beautifying Rails & Ruby code. This can be integrated with interactive Ruby and Rails console if you follow the instructions given below. awesome_print : This is available as open source on Github Source : awesome_print         Option […]