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.
Ruby and Emacs Tip: Advanced Pry Integration
Seamlessly integrate Pry into Emacs. [more inside]
Finding the right level of DRY for your RSpec test suite
From shared contexts to let blocks, we have lots of options for DRYing out our tests in the RSpec world. But how far do we take it? [more inside]
[Screencast] Rails Presenters
Separating view logic from bloated models can help maintain the model in the long run. https://www.driftingruby.com/episodes/rails-presenters
Rails Console Magic Tricks
Some tricks to improve your performance with Ruby console. The 2nd one is my preferred one. [more inside]
New additions to my favorite Ruby community resources
It’s been a while, and I have a few new favorite Ruby resources to share with you!
Symbol in Ruby
In the article, we’re going to explore the following topics:
The 1-week-old ruby.social Mastodon instance already has 500 users
Looking for a nicer or more focused alternative to Twitter? Come join us on the Mastodon ruby.social instance. It got 500 users in a week of existence. [more inside]
StimulusJS with Rails Action Cable and a bit of Sidekiq
Short demo on how to setup actioncable using stimulusjs outside the rails asset pipeline/sprockets area:
Here's what happened at the EuRuKo 2018 conference,
The 35th Ruby conference took place in Vienna, Austria. I’ve summarized my highlights of the 2-day conference in two blog posts, including video recordings of the talks: https://blog.phusion.nl/2018/08/31/euruko-ruby-conference-day-1/ & https://blog.phusion.nl/2018/08/31/euruko-ruby-conference-day-2/
101: Advanced OOP structure in Ruby
In this blog post we will focus on solving a simple task: [more inside]
GraphQL pagination in Rails.
If you are trying to learn how to use GraphQL, there are some basic tips about implementing pagination: .
Statics: Base class and modules for static models.
Statics it’s a simple gem developed using mostly the dry-rb gems and it helps you have “static” models that get their data from YAML files. [more inside]
MiniI18n - New release with Localization support
I just released a new version (v0.5.0) of MiniI18n gem with localization support for dates, time and numbers. [more inside]
Private and protected in Ruby
As a Ruby method is — behind the scene — a message handler associated with a block of instructions that returns an object, the private and protected policies are strongly correlated with the Ruby message concept.. SEE MORE
Rails… Still?!?!
At the Amsterdam Ruby meetup, Chris Salzberg has us metaprogramming and PJ Hagerty explores a number of Ruby and Rails frameworks:
Build a collaborative playlist over WhatsApp with Rails, Twilio, and Spotify
The WhatsApp API is new, but you can play around with it using Twilio. As an example, here’s how to build a collaborative playlist using Rails and the Spotify and WhatsApp APIs.
active_storage + silent logs
if you using active storage you may already seen lot’s of the noise in logs from ActiveStorage about sending files. [more inside]
Ruby on Rails and Node.js compared
Node.js+Express.js or Ruby on Rails? A comparison of two of the most popular choices in the development community. Ruby on Rails and Node.js compared
Exceptional Creatures: SyntaxError!
Ruby’s SyntaxError is raised when encountering Ruby code with an invalid syntax. Meet SyntaxError at Exceptional Creatures
Fat Models, Skinny Jobs
A nod to the tried and true approach from Jamis back in 2006, we keep our Jobs Skinny. And often I just delete the Jobs altogether:
Validators for Interactors
How to leverage ActiveModel::Validations to provide easy validations for your Interactors.
Find nearby locations in Rails with Oracle 50x faster
By utilizing spatial index, we can largely reduce the table rows scanned while finding nearby locations by given city’s latitude/longitude. See how SQL query is speed up by 50x.
active_storage + validations
this gem is to add validations in Rails models without custom validations. [more inside]