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.
Understanding Database Transactions in Rails
Few things are scarier than a database slowly losing integrity over weeks or years. For a while, nobody notices anything. Then users start reporting bugs, yet you can’t find any code that’s broken. By the time you realize the problem, it may be happening for so long that your backups are unusable. We can avoid problems like these with skillful use of transactions. In this article, Kingsley Silas introduces us to transactions at the database level, discusses when they should be considered, and shows us how to use them in Rails.
render_async 2.1.7 Lets You Retry Requests With Delay
Check out new features in the render_async 2.1.7 version! [more inside]
Pros and Cons of Ruby on Rails for Web Development
Ruby on Rails is a popular web development framework. Here are the pros and cons of Ruby on Rails for web development, helping you to make a better choice.
OpenStruct in Ruby
OpenStruct is one of the data structures implemented with meta-programming in ruby. Let’s see what it offers and where can it best fit in day to day coding life. [more inside]
Shellable: Open a REPL within the context of any Ruby object
Imagine you’re building a new Ruby library, and you’d like to provide users with a simple way to experiment with that new library from the inside. Try Shellable.
[video] Learn About Error Tracking in Production
In war, no plan survives contact with the enemy. In tech, no code survives contact with real users. [more inside]
activestorage-horcrux gem
An ActiveStorage service option that uploads shares across one or more other storage services using Shamir Secret Sharing (via the tss-rb gem). Use it in your storage.yml file. It is not a mirror, but can be named as a storage service. https://github.com/johncallahan/activestorage-horcrux. A demo application is available at https://github.com/johncallahan/activestorage-horcrux-example
NameQ: Create unique names via numeric suffixes
NameQ is a gem for when you need to name things, but not worry about whether or not those names are already taken.
TermiChunk: Organize chunks of text within terminals
TermiChunk can take large chunks of text that might otherwise run together, and organize them neatly within your terminal output. [more inside]
Invokable 0.7.0 - Compose, Juxtapose and Knit Procs and Proc-like Objects
- Invokable 0.7.0 Introduces a collection of helper methods for composing Procs and Proc-like objects (any object that implements call or to_proc). Classes that mixin the Invokable module now get === and [] for better Proc compatibility.
Gumball: Dispense expensive Ruby objects with ease
Gumball helps fill the space where a singleton is too static, and endless new objects are too dynamic.
The difference between dependent: :destroy and :delete_all
Adding “dependent: :destroy” to “has_many” is a good choice but can sometimes slow down your code. Switching to “dependent: :delete_all” will decrease the number of SQL queries by skipping validations and callbacks =>
How environment check works in Ruby on Rails?
Did you ever wonder how Rails.production? work? =>
Understanding and Implementing OAuth2 in Ruby
Let me know if this feels familiar. Your users want to “login with GitHub,” so you install a gem, follow the setup instructions, then pray it never needs maintenance because you have no real idea how OAuth2 works. Let’s fix that. In this article, Diogo Souza shows us the fundamental concepts behind OAuth2 and how to implement them using Devise and Doorkeeper.
HexaPDF 0.12.0 released - Interactive forms support
I just released version 0.12.0 of HexaPDF, the versatile pure Ruby PDF creation and manipulation library, which brings support for interactive forms (AcroForm), including a CLI command for filling forms. See
Why is Ruby on Rails a Language of Choice for Marketplace Development?
Our team has been building custom online marketplaces Ruby on Rails for several years now, and we truly think it’s a perfect match. We decided to briefly share the pros of using RoR for marketplace development.
Clear Case of Unclear Casing
Did you know that the following class definition is valid Ruby code? [more inside]
Ruby on AWS Lambda: Integrating with ActiveStorage
Part four in a four part series where we explain some of the more interesting aspects and challenges of using Ruby to build a serverless application. In this post, we investigate what’s needed to integrate a Rails app that uses Active Storage with AWS Lambda [more inside]
Ruby on AWS Lambda: Package and Ship It
Part three in a four part series where we explain some of the more interesting aspects and challenges of using Ruby to build a serverless application. In this post, we go through some strategies surrounding deployment. [more inside]
Ruby on AWS Lambda: Planning and Architecting
Part two in a four part series where we explain some of the more interesting aspects and challenges of using Ruby to build a serverless application. In this post, we talk about architecting options and decisions. [more inside]