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.
CanCanCan 3.0 released 🎉
The most used and appreciated authorization framework for Ruby On Rails receives a major upgrade and comes with some great, new features, like attribute-level permissions. https://medium.com/@coorasse/hello-cancancan-3-0-d6f444312e6f?source=friends_link&sk=3503e2e0de742803c2b26eb95dde3dd2
Action Policy 0.3.0 released
The new action_policy gem release adds universal scopes support, debugging utilities, instrumentation and i18n integration. [more inside]
Application Dependencies: When and Why You Should Upgrade
I recently participated in upgrading Rails framework and learned a few things, if I knew them, it would save me some time. This article is not about upgrading Rails, but it can help you plan your upgrades better.
Active Storage meets GraphQL: Direct Uploads
Vladimir Dementyev in his article explains how to swap the REST part of Active Storage in Rails 6 for GraphQL mutations when dealing with direct uploads. A missing documentation for Rails/GraphQL applications dealing with user files.
faastRuby announces intent to open source its platform to help accelerate serverless
Today @ RedisConf faastRuby announced its intent to open source its entire platform. Here’s a link to our press release: [more inside]
Ruby's Creed
I wrote down some thoughts on Ruby’s evolution (from a purely syntactic perspective) and how they fit (or don’t fit) its creed to “optimize for happiness”.
Monitoring Puma web server with Prometheus and Grafana
Easy monitoring Puma web server with the help of yabeda-puma-plugin gem, the new one of the Yabeda monitoring framework. Checkout out the gem source code.
Announcing a Headless Chrome driver for Capybara!
Announcing the capybara-headless_chrome gem. This Capybara driver wraps up all the nitty-gritty Selenium configuration details, and also provides support for downloading files. We’ve been running test suites from dozens of projects with it ever since PhantomJS was declared EOL, and we think its ready to share with a larger audience. [more inside]
Legacy Rails: Silently Judging You
How can we judge the quality of Rails applications? Are they in good shape? Should we upgrade them to a more recent version of Rails? Should we re-write them? Here is a process that works for us: [more inside]
Ruby Conferences 'n' Camps in 2019 Update - What's Upcoming in April? What's News?
Hello, I’ve updated the Ruby Conferences ‘n’ Camps in 2019 - What’s Upcoming? Calendar page @ Planet Ruby. What’s News? Added Deccan RubyConf (in August in Pune, Maharashtra, India), RubyConf Colombia (in September in Medellín, Colombia), and more. Happy meeting up with rubyists in 2019. Cheers. Prost. PS: Do you have a favorite conference? Let’s give a shout-out to EuRuKo 2019 (in June in Rotterdam, the Netherlands).
The Missing Ruby Code Formatter
I just wrote an overview of the state of Ruby code formatting tools. I hope some of you will find it useful!
Ruby on Rails Protected: Nginx and Passenger
A simple tutorial on how to get your Ruby on Rails web applications protected with Nginx and Passenger -> Ruby on Rails Protected: Nginx and Passenger
Forspell - spellchecking gem released!
Hello! Check out https://github.com/kkuprikov/forspell - it will help you correct spelling mistakes in your documentation.
Maily v0.9.1 - better text emails and Rails 6 support
A new version of Maily (https://github.com/markets/maily) v0.9.1 has been published 🚀. Mainly, includes enhancements when displaying text only emails or text parts in multiparts emails. Also comes with official Rails 6 support and other minor improvements.
safebool gem - Safe Bool(ean) Type Adds Bool(), to_b, to_bool, bool?, and More
Hello, I’ve bundled up all the bool(ean) “hacks” in the safebool gem / library. The new safe bool(ean) type adds Bool(), to_b, to_bool, bool?, false?, true?, true.is_a?(Bool)==true, false.is_a?(Bool)==true, and more. Happy coding with ruby. Cheers. Prost. PS: Note: The safebool library / gem is part of the safe data structure (safestruct) series.
Ruby Regex Timeout / Backtracking Bomb Safety
Safely handle user provided regexes without taking down your servers. https://github.com/grosser/safe_regexp
How we Built a Highly Performant App with Ruby on Rails and Phoenix
A story of developing a Rails app with the assistance of Phoenix app delegated to performing custom tasks. See how the romance between Rails and Phoenix ended with building a highly performant online ticketing marketplace app—https://bit.ly/2Fy7PIc
Tutorial: Upload Files with Rails Active Storage and react-dropzone-component
In this tutorial, we’re going to build an app to manage breakfast recipes and dive into the Active Storage feature and react-dropzone-component library to upload files. Read the article here: https://www.nopio.com/blog/upload-files-with-rails-active-storage/
Scaling a Rails App with Postgres on Heroku
I’ve spent a considerable amount of time learning how to scale Rails applications on Heroku for events anywhere from major product launches to live TV appearances like SharkTank and Beyond The Tank. Here’s what I’ve learned: https://scottbartell.com/2019/03/26/how-to-scale-ruby-on-rails-app-on-heroku/
enums v1.2 library / gem adds (enum) flags w/ bitwise-operators (|, &~, ^)
Hello, I’ve added (bit) enum flags with bitwise-operators for set (|) / unset (&~) / toggle (^) to the enums library / gem. Use the flags option for the enum helper or the new Flag class. Happy enumerating or bit flagging or masking with (secure) ruby. PS: Note: The enums library / gem is part of the safe data structure (safestruct) series.
How to simulate Redirect using POST in Rails
There is a common question: - “Is it possible to redirect using a POST method?” And the answer is: - “Redirection isn’t possible with POST requests - it’s part of the HTTP/1.1 protocol”. To perform the request with POST params, need to introduce another step that contains the form data, so you need additional view in your flow. To simplify that you can use a specific gem Repost which will generate hidden step with needed form data under the hood.