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
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
SimpleAMS: Modern Ruby serializers
A little bigger than expected blogpost regarding a library (SimpleAMS) I have built for serializing Ruby objects. The blog post goes through some history regarding Ruby serializers, presents the SimpleAMS lib, and compares it with some common Ruby libraries (benchmarks included!). Ends with some talk regarding APIs.
Yukihiro Matsumoto: "Ruby is designed for humans, not machines"
We’re thrilled that our good friend Yukihiro Matsumoto, creator of the Ruby programming language, has been able to join us at RubyRussia 2019 as a speaker for the second time, having previously spoken three years ago at RubyRussia 2016. [more inside]
Let’s talk about that 15% Ruby claim
DHH wrote Only 15% of the Basecamp operations budget is spent on Ruby about how his company only spent 15% of their $ 3,000,000 annual budget on Ruby systems. I’d like to share some thoughts about that: https://medium.com/@wintermeyer/i-call-bs-on-the-15-ruby-claim-5c37a4bd00b6
Monobank API Ruby
Unofficial Ruby Gem for Monobank API - https://github.com/vergilet/monobank
Testing signed and encrypted cookies in Rails
Signed and encrypted cookies are really easy to use in Rails, but less clear is how to test them. Some test classes make it easy, others do not. So how do we test signed and encrypted cookies in Rails?
How to solve flaky Rails specs
continuing the recent discussions in the community about flaky Ruby tests, I introduce a project that shows flaky rspecs and example solutions. This can be used to practice fixing real-world flaky Rails test suites.
Pros and Cons of Using structure.sql in Your Ruby on Rails Application
Discover the major differences and benefits of using structure.sql vs schema.rb in your Ruby on Rails application. [more inside]
3 ways Webpack surprises Rails developers
I spent the past month answering Webpack and Webpacker questions on StackOverflow and came away with some thought about what trips up developers most. https://rossta.net/blog/three-ways-webpack-surprises-rails-developers.html
Cache Crispies - Fast, Flexible Rails Serializer
Picking a method of doing JSON serialization in Rails has not been an easy decision as of late. Especially if you’re not able to break your APIs by moving to a JSON API structure. And trying to mix in a caching strategy, certainly doesn’t help. That’s the problem the new Cache Crispies gem was written to fix. [more inside]
The top Ruby Weekly links of 2019
https://superhighway.dev/ruby-2019 - A look back at what proved popular with Rubyists last year.
How to create a complex testing context in a few seconds ?
https://github.com/morissetcl/like_im_five A simple gem that generate a file with factories you need to test a specific object. It use you DB development to retrieve the object you want and all associations you need to setup the test.
Development must be fun
https://github.com/igorkasyanchuk/sabotage would like to add this to your project?
Rails, Routes, & Flags
In case it went under your radar. You can now use flags for rails routes. [more inside]
Duplicating models with complex nested associations
For one of our current project, we needed to duplicate model records as well as their children and recursive associations. That’s a fun thing to do … so we wrote what we found here
What's new in Ruby 2.7
Ruby 2.7 has introduced a few new features, like new syntax for pattern matching, startless ranges and numbered parameters, while some others like the pipeline operator and the method reference operator didn’t make the cut. Here’s a quick summary: [more inside]