Anthony Harvey's Blog

Anthony Harvey's Blog

Ruby Array Set Operators

Aug 14, 20192 min read

Have you ever had an array that you only want to include unique elements? list_1 = ['apple', 'orange', 'grape'] list_2 = ['strawberry', 'apple'] combined_list = (list_1 + list_2).uniq combined_list #=> ["apple", "orange", "grape", "strawberry"] In t...

Ruby Array Set Operators
Rails Security Best Practices - Check For Unauthorized Access
Guard Clauses vs. Nested Conditionals
Stock Market Game - A React & Ruby on Rails Project
How to create a global .gitignore file
Ruby If, Unless, While and Until