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.
Object-Oriented Programming (OOP) with Ruby
Learn about Object-Oriented Programming (OOP) with Ruby, and become a better Ruby developer. Read it here.
Delegating Methods In Ruby With Forwardable
Are you working in a Ruby project and need to delegate methods but you don’t want to add a new gem just to do that? The Forwardable module is your answer and Ronney shows how you can use it with a practical example. [more inside]
Safely Migrating from Paperclip to Active Storage
Paperclip is now deprecated and a lot of Rails systems are using it. Migrating from Paperclip to Active Storage is scary when you have real data. This article describes the migration and how to test along the way for a confident switchover.
Digging into Rails fragment caching
Hello, I started a series of post called Disassembling Rails, and my first post is to explain how Rails’ fragment caching works.
Rails API + JWT auth + VueJS, Part 2: Roles
The article describes how to set up roles within VueJS SPA
Crystal is not Ruby Part 2
Crystal is a very interesting project that I have been following for the last couple of months. In part 2 I explore the cool bits of Crystal that are different from Ruby. [more inside]
Rails and Conditional Validations in Models
Adding consents for accepting Terms of Service/Privacy Policies must have been a top popular feature in the majority of the applications due to enforcement of GDPR in May ;). From the technical aspects that GDPR requires, there is a proof of consent for processing the personal information. In that case, you need to have some actual attributes in the database that would confirm the fact that some user has indeed accepted Terms of Service/Privacy Policy. [more inside]
CASL and Cancan. Permissions sharing between UI and API
An example of functional Rails5 API which shares CanCan defined abilities with Vue frontend with help of CASL
Create An Array In Ruby Without Square Brackets
A “Today I Learned” trick: [more inside]
Modular Monolith example in Ruby on Rails
An example of functional Rails application built using engines and local gems, check seeds.rb for credentials to use - article
sportweb - Instant sport.db Web Admin (Rails Engine) Command Line Tool / Server
Hello, for the world cup I’ve updated the sportweb command line tool that lets you browse your local sport.db / worldcup.db with a built-in instant web admin server (and rails engine). Browse all world cups (from Uruguay 1930 to Russia 2018) or build your own league / tournament. Cheers. Prost. Enjoy the beautiful game with ruby (and rails).
Why you should visit the next RubyKaigi
RubyKaigi is the annual Ruby conference organized in Japan. Have you been there this year? Let me tell you why you should visit this conference in 2019 🙌 https://blog.daftcode.pl/why-you-should-visit-the-next-rubykaigi-501317c60d6d
Removing magic with magic (metaprogramming)
A case of safaley removing “magic” library (metaprogramming with implicit effects) using even more metaprogramming in legacy codebase. [more inside]
How This Home Maintenance App Uses Ruby on Rails
I interviewed the CTO of Jiffy, a Toronto-based home maintenance app built with Ruby on Rails. Here are some of his thoughts on the pros and cons of working with Rails. [more inside]
Extending Zendesk with the help of Zendesk App, Ruby on Rails API and CORS
We use Zendesk in one of our projects for processing users feedbacks and here is a story of how we developed our own Zendesk App to improve this service.
3 ways of iterating over tree-like ActiveRecord structures
Three ways of iteration over tree-like data structure and a comparison of their performance. https://prograils.com/posts/three-ways-iterating-tree-like-active-record-structures
Using Replica database with your ActiveRecord models
Sometimes you may need to access not only your live production Database but also replica - for example, to lower down the CPU load on main DB. How to do it? How to keep the model in sync with the main model and prevent writes to it? I explained it in this blog post on Medium.
SpreadsheetArchitect v2.1.0 Released
Spreadsheet Architect is a library that allows you to create XLSX, ODS, or CSV spreadsheets easily from ActiveRecord relations, Plain Ruby classes, or predefined data. https://github.com/westonganger/spreadsheet_architect
How to Build a Full-Text Search Form with Rails & AJAX
Create a Rails full-text search form that submits via AJAX to render results without a page reload. http://www.rymcmahon.com/articles/11
Golang for Rubyists. Part 6. Structs, Methods and Interfaces
Sixth post from a series, which is intended to help Ruby developers to get a foot in the door of Golang. http://zonov.me/golang-for-rubyists-part-6-structs-methods-and-interfaces/
Maily v0.7.0 release: Rails 5.2, new logo and more
A new version of Maily (https://github.com/markets/maily) v0.7.0 has been published. Mainly with Rails 5.2 compatibility, new logo, lots of UI tweaks, allow to hide emails and more.
Rails Testing Handbook on Kindle
You can now read Rails Testing Handbook, a hands-on guide to building better Rails apps with confidence using behavior-driven development on your Kindle: https://semaphoreci.com/blog/2018/06/20/rails-testing-handbook--on-kindle.html