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.»
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.»
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.»
In Ruby read json file to hash can be achieved using File Handling. Example to parse json file to hash is illustrated with this tutorial.»
In Ruby draw line on image, draw circle on image/ various shapes can be drawn using RMagick gem. To install RMagick gem you need to add RMagick in Gemfile»
Pagination in Rails can be implemented easily with
will_paginate modifies Collection of ActiveRecord in a way to implement pagination.
attr_accessor is used to define an attribute for object of Model which is not mapped with any column in database. This answers question - What is attr_accessor in Rails.»
While working with Rails Migration Difference between Text and String is important to be known to every developer. Columns and their data types are finalized while deciding Table structure.»
Semantic UI is the new popular CSS, JS framework for beautifying your Website. Tutorial will help understand how to integrate Semantic UI with Rails application and how to test the sample Semantic UI components with your Rails application.»
How to Integrate Twitter Bootstrap Rails with Rails project is the First question that developers have to face before starting a new project. It can be done using Gem twitter-bootstrap-rails or manually.»
Attributes can be accessed from ActiveRecord in various ways including symbolised, stringified or direct access. Each type of access has it’s own advantages and disadvantages as we will see in this tutorial.»
rails nameerror uninitialized constant class will occur if your rails console is not loaded with configuration of the class file containing method being called.»
Sometimes developer requires to extract only file extension from the string object.
File class can be used to perform this operation.
We will see how to use
File class to get the extension name.
Difference between && and and in ruby is mainly the Precedence of these operators. ‘and’ and ‘&&’ both have different precedence. This tutorial will help understanding with the help of examples.»
This is common question for Ruby on Rails developer(Beginner). Map and Collect both are looping methods used on Array, Hash etc. This tutorial will help understanding the exact difference between these two methods.»