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.
Ruby Method Overloading
A hack to add Method Overloading feature to Ruby. https://lucaguidi.com/2020/07/22/ruby-method-overloading/
To Call or not Callback
This is the question for ActiveRecord callbacks, https://marouenbousnina.com/tutorials/2020-07-20-to-call-or-not-to-callback/
How To Extend Float Class In Ruby
Sometimes we need to customize Ruby classes. I am going to introduce how to extend the Ruby Float class in simple steps. https://www.botreetechnologies.com/blog/how-to-extend-float-class-in-ruby
New Truemail 📨 web API client library for Ruby
New version of Truemail web API client has been released :rocket:: https://github.com/truemail-rb/truemail-ruby-client
tty-prompt v0.22.0 release with many new features
The latest tty-prompt release packs many new features that further enhance prompting users for input. Conversion of input into Array or Hash objects, :quiet option to silence output and allow for dynamic menus, :show_help option to control help display (on_start/always/never), shortcuts for selecting of all/reverse choices in multi-select prompt and much more. Enjoy!
Installing Omnivore API in Ruby on Rails Application
Integrate Omnivore API in Ruby on Rails development to access every action and detail in PoS transactions. Here’s how to install Omnivore API in your Ruby on Rails project. https://www.botreetechnologies.com/blog/omnivore-api-ruby-rails
Integration Testing Best Practices (aka how to sleep at night)
In this video, I reflect back on 10-years of integration testing my Ruby on Rails app using rack-test and Selenium and distill what’s important in reducing brittleness, improving test speed, and getting the most bang for your testing buck: https://www.semicolonandsons.com/episode/integration-testing-best-practices
Introduce renderer module
Just published the fifth chapter of the API-only ruby on rails course: Introduce renderer module [more inside]
Anonfiles.rb
https://github.com/peterlamber/anonfiles.rb up & download images to anonfiles - the free anonymous (duh) filehoster
Blocks in ActiveRecord's where, a small post
https://dev.to/brunvez/a-take-on-empowering-activerecord-4iog ActiveRecord has limited power when it comes to complex queries, this is a proposal to improve the way we query for data
Defining gem dependencies in single file Ruby scripts
Bundler has an inline gemfile definition feature that lets you define gem dependencies in a single-file Ruby script. Read on to see how: [more inside]
Building a Toy Lexer in Ruby
Lexers are magical. They take your messy, hand-typed, human text, and convert it into a clean data structure that the computer can process. Every time you run a ruby program, use structured search or type in a date by hand, you’ll find a lexer hard at work. In this article, Alex Braha Stoll pulls back the curtain to show us how lexers work and how to implement one for a simple programming language. https://www.honeybadger.io/blog/building-lexer-ruby/
Modifying Ruby's StdLib with Gems
How to safely patch Ruby’s StdLib in Gems, how to avoid issues of combined Module#prepend & method aliasing, from other patches.
Traffic problems: Software vs. Daily life
Interesting similarities in impacts and solutions https://medium.com/p/709d75229b86?source=friends_link&sk=882126397b35b32895295b3e88c170f7
Custom directory for Webpacker in Rails apps
It is possible to use custom directory for #Webpacker code instead of the default app/javascript 🤟🏻 [more inside]
Sharing Code with Ruby and Rails
Ruby and Rails provide many ways to share code between objects. If you’re new to Ruby or Rails, or don’t work in them often, it can be hard to remember what each one does. Despite this, each of these tools serves a different purpose in a Ruby system’s architecture; understanding when to choose one over another can make your code more readable and maintainable. [more inside]
System of a test: Proper browser testing in Ruby on Rails
An ultimate Ruby on Rails browser testing setup for 2020. Vladimir Dementyev from Evil Martians, author of AnyCable, TestProf, and Action Policy, distills years of testing experience into this easy-to-adopt practical guide.
Rails 6.1 adds support for where with a comparison operator
https://blog.bigbinary.com/2020/07/14/rails-6-1-adds-support-for-where-with-comparison-operator.html
How to control the enqueuing speed of Sidekiq jobs and their concurrency
How to control the enqueuing speed of Sidekiq jobs and their concurrency using Redis and BLPOP https://minhajuddin.com/2020/07/13/how-to-control-enqueuing-speed-of-sidekiq-jobs-and-their-execution-concurrency/