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

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

awesome_print

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 […]

Rails Migration Change vs Up Down Methods

Rails Migrations have different ways of writing with change or up down methods. This tutorial will discuss exact difference between the both and what you should use for your migration. Rails Migration Change vs Up Down methods is important to be understood otherwise your migrations may behave in a way you might not want. Example […]

Rails Connect to Remote Database in Development

In Rails Connect to Remote Database on localhost, task can be achieved by editing database.yml file in your Rails application. Make changes to host, username, password and database in your database yaml file to connect to remote database. What is database.yml? You might want to see the Article on what is database.yml file contains and […]