Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

Arrays and Hash In Ruby

Ruby's arrays and hashes collections having indexes. They can also be said as indexed collections. Arrays and hashes store collections of objects which can be accessed using a key. Both arrays and hashes grow as needed to hold...

Iterators and its usage in ruby

In Ruby, iterators are methods basically used by the collections. Collections are a set of objects. Hashes & Arrays are the example of collections. Iteration is a process by which we can get or set the elements in collections. We will discuss...

Few Important Hash Methods in Ruby

Hash: Hashes are way of storing data in key-value pair format. Key can be any ruby object ( i.e. string, numbers ). Here we will see some of mostly used methods for hashes. 1) Creating/Initializing a hash: Hash can be created i...

Hash Conditions in Active Records (Rails)

Hash Conditions in Active Records (Rails) Active records allows us to to pass in array conditions to our query to fetch a single record or all the records matching  the key value pair. In these hash conditions we pass the key as the na...

Ruby Sort an array of objects in hash with case insensitive attribute

To sort an array of objects in hash @users = User.find(:all) @users.sort_by(&:employee_name) Above code will sort @users object with all employee name with Capital letter first and then small letter. ...

How to keep the order in ruby hashes

When we insert the data into a ruby hash it reorders the data in some other order when we use it in view file.So there are cases when we have to show the data in the same order in the order we are inserting the data into ruby hash.So in case wher...
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: