In one of my recent project, I am receiving Excel files from external APIs and I have to parse, validate data and then I have to insert into database table. So I have created a task to automate this process, this task […]
ROR – How to update email of user when using devise gem?
If you update user email address when you are using device gem, it will be stored in the unconfirmed_email column and it will trigger email by asking confirmation with a confirmation link. If you want to override this […]
How to Delete a File in Ruby
The following tutorial describes how to delete files and directories that you no longer need in your application. Removing a single file in Ruby is simple and straightforward, with File.delete. This method Deletes the […]
Ruby – Check whether a file or directory exists
Checking whether a file exists or not, is one of the most basic file-related tasks which you will do most of the time, and thankfully Ruby’s File class provides two methods called File.file?(),File.exist?() to test […]
How to iterate over an array in Ruby
Each construct provides an easy way to iterate over arrays and hash. each loop will continue until it has gone through every item in the array. We have an associative array that stores the names of fruits. We want to print […]
Ruby on Rails Framework basic tutorial
From Ruby on Rails developers “Ruby on Rails® is an open-source web framework that’s optimized for programmer happiness and sustainable productivity. It lets you write beautiful code by favoring convention over […]