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.
A Safer Rails Console
Rails console is great to have in your toolkit, but its power can amplify the effects of mistakes. We discuss strategies for making it safer and built a gem around that. https://www.salsify.com/blog/engineering/a-safer-rails-console
[Screencast] Ruby on Rails - Tips and Tricks
In this episode, we will go through some of the tips and tricks that we often take for granted. We will be looking at nested routes, scopes, migrations and more. https://www.driftingruby.com/episodes/ruby-on-rails-tips-and-tricks
Optimize Rails performance bottleneck with caching and Rack middleware
A tutorial about Ruby on Rails optimization technique which resulted in over 500% performance improvement. Covers basic caching with Redis and custom Rack middleware setup. [more inside]
RSpec - create your own custom matcher
RSpec built-in matchers are great but sometimes they are not enough. Fortunately, we can create easily our own matchers. Of course, we can then reuse them across the whole application - I want to level up my RSpec game
Hello Stimulus on Rails
A pull request to get you started with Stimulus on Rails via webpacker [more inside]
Views in Ruby on Rails – advanced usage of content_tag helper
Generally, there are two common ways of creating HTML code in your Ruby on Rails app views: you can simply write HTML code or generate it by using helpers from ActionView module. LEARN MORE
Stimulus with Turbolinks, select2 and FormValidation in Rails
A short before and after example of conversion into using Stimulus [more inside]
Ruby on Rails refactoring - service object pattern
This refactoring pattern is very simple but I found it very useful in every app I was working on. You can use it wherever class or method has to much code. Learn about this pattern
Panko Serializer -High Performance Serialization for ActiveRecord
High-Performance serialization for ActiveRecord (and very soon for plain Ruby objects) which shows 40% to 70% performance boost! [more inside]
How to Separate Features for Different Organizations in a Rails App
While different web apps often have the same codebase, each can still provide different features to organizations, or so-called tenants. In this article we’ll review three methods of separating features in your multi-tenant Rails-based SaaS application.
Rails + Angular2. How to organise your two layers application in a monorepo
Organising your work when you have a two layers application can be very difficult. In this article I will list the common issues and propose a solution which uses a monorepo. You can also find an example on GitHub. Enjoy! [more inside]
Ruby on Rails and nested transactions - learn how to use them
It is easy to create nested transactions but it is not obvious how to rollback them properly to revert our changes when something went wrong. I want to learn how to rollback nested transactions
A first naïve look at TruffleRuby
I wanted to try out TruffleRuby, so I took raw notes as I went and shared them to encourage other people to try it out too.
Quick Ruby tip - how to process nested hash in a simple way
A simple way to process nested hash in Ruby: Read more
Ruby Conferences ‘n’ Camps in 2018 - What’s Upcoming?
Hello, I’ve updated the Ruby Conferences ‘n’ Camps in 2018 Calendar @ Planet Ruby. What’s news? The calendar now uses a month by month view. New conferences include: RubyConf Belarus, RubyUnconf Hamburg, and some more. Anything missing? Additions (and updates) always welcome. Cheers.