Short trick for joining an Array
Contact me at LinkedIn  RailsZilla at Facebook  RailsZilla at twitter   google +1  Contact me at Xing  connect me at github

Short trick for joining an Array

Posted in Rails, Ruby

Today I’ve a quick and simple trick for you… I often use this when i intend to work with lots of Arrays. This way is short and elegant and there are many wrong tracks for you, doing the following task too complicated. Every Ruby programmer knows that if you supply a number to an Array, […]


Convert two dimensional array into hash

Posted in Ruby

A friend asked me how to transform a two dimensional array into a hash … Thats not allways easy. The reason is, that not every array accomplishes and meet the criteria of a key-value pair, which we call hash. So the well known commands like 12number.to_s float.to_i can not be extendet to a method like […]

Tags: , ,

Copyright © 2011-2018  - RailsZilla – Ruby on Rails tutorials, tips and tricks All rights reserved. | Imprint | Privacy