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.
Client-Side Validation Powered By ActiveRecord
How to expose validation logic from the server to power client-side validations: https://medium.com/@ccschmitz/client-side-validation-powered-by-activerecord-6d8c1fed4e6
Building a Testing Framework Similar to RSpec in Ruby
A guide to building and understanding a testing frameworks like RSpec [more inside]
Firefox needs some more RAM to run your Rails system tests
Just a quick remainer to increase memory limits for system tests.
Generating Random Numbers in Ruby
Random numbers are useful for a variety of purposes such as in gaming, encryption and building simulations. In this article, we’ll look at the various ways you can generate random numbers in Ruby. [more inside]
Trolling in Ruby - Implementing JavaScript-like Maths With Implicit Conversion Hijack
If you’ve ever worked with JavaScript, especially in pre-SPA/pre-frameworks era with just jQuery, you probably had a chance to see an “exotic” maths in action that looks similar to this: [more inside]
Using Rails Encrypted Credentials with Docker
A quick post on how to use rails credentials:edit when developing your Rails apps using Docker containers https://www.chrisblunt.com/rails-on-docker-rails-encrypted-secrets-with-docker/
ButterCMS vs WordPress: Why Choose Butter
Learn about the WordPress fallacies that lead people to use it as their default CMS experience and why Butter may actually be the ingredient you need.
Static site generator in 20 lines
Super short article about how and why would you want to build your own personal static site generator: http://masa331.github.io/new_posts/create_your_own_static_site_generator.html
[Podcast] Ruby Rogues - Hiring with Mindaugas Mozūras
In this episode of Ruby Rogues, the panel talks to Mindaugas Mozūras about hiring. Mindaugas is from Lithaunia and has worked at Vinted for the past 6 years, starting as a software developer and is now is the head of engineering there. They talk about why it’s hard to find great developers to hire, the importance of hiring both junior and senior developers, and his blog post A User Guide to Me. They also touch on how you come about writing up job roles, the importance of letting developers think outside of the box, and more! [more inside]
Ruby on Rails Active Storage how to change host for url_for
By default ActiveStorage url points to http://example.com: [more inside]
The Enumerable module in Ruby: Part I
In this article we’re going to explore the following topics:
5 Things I Learned about Google Tag Manager Being RoR Developer
Mistakes are the best way to learn new things. This time I wrote about a few solutions to make integration with Google Analytics (GTM) simpler based on my experience. READ
Rails credentials cheat cheat
Rails introduced “encrypted” credentials from rails version 5.2 in this T.I.L. note I’ll show some tricks and notes around this feature: [more inside]
Ruby on Rails: Send emails with style
Most of us had already at some point to deal with the pain of sending HTML formatted emails using Ruby on Rails. Here you’ll find some solutions - Ruby on Rails: send emails with style
Speeding up Docker image build process of a Rails application
We reduced the Docker image building time of our Rails application from 10 minutes to 5 minutes by re-using bundler cache and by precompiling assets. Read the full story at our blog - https://blog.bigbinary.com/2018/07/25/speeding-up-docker-image-build-process-of-a-rails-application.html
Double announcement: Jekyll-Timeago release and mini_i18n launch!
The first one, is a new release (v0.10.0) of the Jekyll-Timeago plugin, a little library to display distances of dates in words. Now ships with a more flexible i18n system and a more useful integration with Jekyll, allowing for example, set a different language per page. [more inside]
Exploding Rails giveaway
Want to learn how to build Rails apps with rom-rb and dry-rb? We’re giving away three copies of Exploding Rails from Ryan Bigg! [more inside]
[Screencast] Performance improvements in Rails using derailed_benchmarks
A quick look into the derailed_benchmarks gem, and how I use it to try to improve performance on Rails apps: https://www.ombulabs.com/blog/rails/performance/benchmark/performance-improvements-using-derailed-benchmarks.html
The Definitive RSpec Tutorial (With Examples)
Would you like to learn how to write tests for your Ruby applications using RSpec? Then this is article is for you! https://www.rubyguides.com/2018/07/rspec-tutorial/
Optimizing batches in Rails for a healthcare directory based on event-sourcing
A very practical optimization about ActiveRecord batches strategy when dealing with heavily joined queries: https://medium.com/lifen-engineering/optimizing-batches-in-rails-for-a-healthcare-directory-based-on-event-sourcing-7901853404f6
tty-box - draw various boxes in terminal emulators
The tty-box gem helps you draw boxes around your content in terminal window. You can easily wrap and add padding to your content. It supports Unicode and multi-width characters out of the box (you see what I’ve done here ;-) Enjoy!