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.
Adding dynamic "getters" and "setters" to Ruby Objects.
Hi! This is my first post here. I created a blog post on creating a dynamic “attr_accessor” for a Ruby object! Figured I’d share with the class!
smart_init gem has been updated to work with Ruby 2.7 without warnings
A simple gem for eliminating Ruby initializers boilerplate code, and providing unified service objects API. It has recently been updated to work seamlessly with Ruby 2.7 Read more
Ruby Refinements
Ruby Refinements. Ruby ecosystem allows us to modify or redefine existing class definitions. This is known as Monkey patching.
The very first draft of Rake
30 LOC that changed everything.. rubycademy.com/rake
TimeBoss: Broadcast Calendar navigation made simple
TimeBoss provides you a simple language with which to browse the Broadcast Calendar, a standard Gregorian calendar, and is easily extensible to other custom financial calendars.
Invokable 0.6.0 - Treat classes as curried functions!
Invokable 0.6.0 Brings an improved API for treating classes as curried functions that has now be included in the core module.
How to Avoid Dumb Coding Mistakes (Part II)
Programming for me is less about “getting it right” than “not getting it wrong”. To that end, I’ve documented and categorized the most common dumb mistakes I make, the idea being that awareness of these downfalls is transformed into a mental checklist of considerations for avoiding mistakes. Read more
Introduction to Ruby on Rails Patterns and Anti-patterns
Dig into the basics of design patterns and anti-patterns.
Removing unused code with git bisect
What can you do when you find code that is not used anywhere? Read more
Our Code Review Etiquette
Code Review is one of the greatest tools we have as software developers to help us improve the quality of our code. It can be incredibly beneficial, but it can also be a source of pain, frustration, and overall, a waste of time instead of a time-saver.
Securely Send Large Files for Free Using Ruby with Firefox Send
Learn more how to send large files securely for free using ruby with firefox send. We evaluated couple of free services and finally chosen firefox sen.
The real return value of Struct::new
rubycademy.com/struct-new
How to Test Ruby Code That Depends on External APIs
Few things are more frustrating than slow, flaky test suites. You’re ready to deploy, wait 20 minutes for CI to run, only to find that a test failure in code you’ve never touched is blocking you. You dig into the source and find the problem: an external API call. It works (slowly) most of the time. But sometimes the network glitches and it fails. What do you do? In this article, José Manuel shows us several techniques for removing external API dependencies from our tests.
Ruby 2.7's "pattern assignment" reads like a charm
[1, 2, 3, 4] in [first, second, *other] # Puts 1, 2, [3, 4] into variables called first, second and other!
Unlearn programming to learn Ruby
In most programming languages, the language is seen as an intermediary between the machine and the developer. In Ruby, the language is.. READ MORE
How to Improve ActiveRecord Query Performance with Subquery Caching
Slow database queries are a common performance bottleneck for Ruby on Rails apps. Simplifying a complex query is often not possible due to the underlying business logic. Instead, you can extract parts of a query, cache and reuse them to improve performance. In this tutorial, I’ll describe a range of techniques on how to do it. Read more
Noticed - Notifications for Rails apps
Noticed is a notifications library for Rails that allows you to easily deliver notifications to users via database, email, ActionCable, and other delivery methods. Check out Noticed on Github