The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Describes how to keep classes and methods open for extension but closed for modification: http://rubyblog.pro/2017/05/solid-open-closed-principle-by-example
Level up with Git — From the basics to managing multiple cross dependent branches and emergency situation solutions. https://6ftdan.com/allyourdev/2017/05/25/leveling-up-with-git/
Testing your code well is hard, and it can be easy to neglect. You’ll be glad you didn’t though when you have to change the implementation of a feature without your users noticing anything, except maybe a performance bump. Let’s go through how we can use and modify existing tests to allow a change in code that you can be confident will work when you get to production. https://chrisherring.co/posts/put-your-tests-to-good-use-refactor-with-confidence
https://alexcastano.com/everything-about-ruby-splats/ Even though splats in Ruby are common, there are some complex edge cases that can be misleading. Let’s see them together.
A couple of months ago, we started a new project and decided to use Ember on the front and Rails as an API backend. Early in development, we found ourselves repeating similar code in multiple places in our controllers, so we decided to roll our own solution to the problem. Check out our blog post for more details.
Semaphore Boosters automatically parallelizes tests in large Ruby projects and cuts test suite runtime down to a few minutes.
Learn how to use the power of graphs to solve interesting problems! http://www.blackbytes.info/2017/05/graph-theory-in-ruby/
Using Bootstrap in your application has become much more simple. Also learn to create some helper methods to make working with Bootstrap much easier. https://www.driftingruby.com/episodes/bootstrap-framework-and-ruby-on-rails
Your *nix computer will ship with a version of Ruby, and this seems great, you can get up and going right away and writing code. Things though are not all as they seem, you shouldn’t use that Ruby. https://chrisherring.co/posts/why-you-shouldn-t-use-the-system-ruby
Pry is a great resource for debugging and exploring code: https://blog.cognitohq.com/five-pry-features-every-ruby-developer-should-know/ [more inside]
Example of refactoring by following Single Responsibility Principle: http://rubyblog.pro/2017/05/solid-single-responsibility-principle-by-example
Hello, I’ve added support for reading feeds in the new JSON Feed format in - surprise, surprise - JSON to the universal feedparser gem. Nothing changes if you read in feeds in xml or json ;-) Use it like: [more inside]