I’ve received an email from a fellow software developer inquiring about a bit of code where I use Ruby’s splat operator in two different ways. One is for consuming all parameters in as one array variable, and the other is to consume all entries out of one array as parameters.
If you've worked with Ruby's exceptions before, you know you can specify which exceptions get rescued and which are not and you probably know that when you rescue a "parent" you rescue all of its "children" as well.
Ruby 2.4 will have the feature to introduce a REPL session, using IRB, in between your code execution for better debugging. IRB, which stands for Interactive Ruby, is the standard REPL which is bundled along with ruby.
I recently had an opportunity to make a small object with a single responsibility. The object would be used to build the SQL fragment that gets passed as a parameter to ActiveRecord's .order() method.
When I first began implementing background jobs I found myself moving my code into an appropriate background class whether it was in app or lib somewhere. I found it frustrating that I needed to shift code around based only on the decision to run it in the background.
I recently started a new project with Rails 5, and at some point I found out the code was not behaving as expected. The initial scenario was quite simple, Admins can have many Phones, as this code suggests
For the past year, we’ve ranked nearly 13,500 Web Development articles to pick the Top 10 stories (0.074% chance) that can help you prepare your web career in 2017.
On stackoverflow and elsewhere I stumbled over questions about inheritance in PostgreSQL a couple of times.1 People are confused about how this feature is related to inheritance in object oriented programming (OOP) and how to use it.
In 1982, my family took delivery of the very first IBM-PC in Israel. We actually went down to the warehouse and waited while our PC was delivered from the port.