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.
All the different ways to set attributes with Active Record on Rails 6
I put together a handy guide comparing all the different ways you can set attributes on an Active Record object in Rails 6. At a glance the cheat sheet shows you which methods save to the database, run validations, run callbacks, update timestamps, etc.
Open Dota API Ruby
Gem is now extended with Players Endpoint - https://github.com/vergilet/open_dota_api
A guide to NPM version constraints for Rubyists
Now that more Rails projects use NPM to manage JavaScript dependencies, I thought it would be useful to provide a reference guide to NPM version constraints in comparison with similar conventions used to specify Ruby dependencies in a Gemfile. https://rossta.net/blog/npm-version-constraints-for-rubyists.html
SimpleCov v0.18 released with support for branch coverage
At long last SimpleCov has received a major update with support for the branch coverage added to the Coverage standard library module introduced in Ruby 2.5
Ruby on Rails project RuboCop setup with RSpec
RuboCop is the most popular Ruby static code analyzer and code formatting, code linter in short. Linting is the process of running a program that analyzes the code for programmatic and stylistic errors. [more inside]
A Rubyist's Introduction to Character Encoding, Unicode and UTF-8
Have you ever dealt with a unicode bug? Where plain text — the substance you work with all day — can no longer be trusted? It can be disorienting to say the least! This article will help prepare you so that the next time that happens you’ll be able to spend less time hyperventilating and more time troubleshooting. Check it out on our blog: https://www.honeybadger.io/blog/the-rubyist-guide-to-unicode-utf8/
screen-recorder v1.4.0 released with support for audio and screenshot capture.
Ruby gem to video record or take screenshots of your computer screen - desktop or specific window. Works on Windows, Linux, and macOS. https://github.com/kapoorlakshya/screen-recorder
planet.rb quick starter script v1.0 - (auto-)add blog posts to your (static) website
Hello, I’ve updated (and un-gemified) the planet.rb quick starter script v1.0 that lets you add articles & blog posts to your static (jekyll & friends) website via feeds (and planet pluto). Happy planet! Prosit 2020! PS: You can find a live sample “Planet Ruby” website built with the planet.rb quick starter script (and jekyll / github pages) online @ http://feedreader.github.io/jekyll.planet.sample. For a great real-world example / setup see the “Planet OpenSUSE - Linux OS” @ https://github.com/openSUSE/planet-o-o.
Kubernetes-native development: sync files with Ksync
Playing around to make a full-featured development environment on top of Kubernetes and sync files back and forth within Kubernetes and local machine.
How to use Uppy with ActiveStorage
Uppy is a Javascript library for uploading files via drag & drop, paste, Dropbox, Google Drive and more. Learn how to use Uppy with ActiveStorage to provide a nice UI for direct uploads in Rails.