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.
gem to protect your content from copy-pasting
https://github.com/igorkasyanchuk/secrett11tto (DEMO available) if you have sensitive or private content which you want to protect from copy-pasting you can try to use this gem. [more inside]
use this gem today :)
https://github.com/igorkasyanchuk/sabotage fun gem for April 1 :)
Nested constants in Ruby
Did you know you can define nested constants in Ruby like this? [more inside]
The S in SOLID
A discussion about the S in SOLID, covering the significance of this principle and some practical ideas for applying it. https://www.ombulabs.com/blog/learning/software-development/the-s-in-solid.html
Dislodging mimemagic And Understanding MIT & GNU GPL.
Learn the difference between the MIT and GNU GPL licenses to know which open-source software you can include in your projects. https://emmanuelhayford.com/dislodging-mimemagic-and-understanding-mit-gnu-gpl/
Lazy-loading content with Turbo Frames and skeleton loader
Add lazy-loaded content with your own custom loading skeleton with Hotwire + TailwindCSS: https://boringrails.com/tips/turboframe-lazy-load-skeleton
Exploring RSpec – Improving Your Testing Skills
Some great features everyone who works with rspec must use! [more inside]
Why Write Rails View Tests
Find out how and why to write Rails view specs with RSpec. [more inside]
Which is fastest? ERB vs. HAML vs. Slim
A fast app means happy users. The speed that your pages render depends on which templating system you use. In this article, Diogo Souza puts the three most popular Ruby templating engines to the test to see which is fastest. In the process, he shows us how to construct benchmarks and do our own investigations into performance. https://www.honeybadger.io/blog/ruby-template-performance-erb-haml-slim/
Anything I Want With Sequel And Postgres
In this article I talk about many Postgres goodies, including table partitioning, upserts, COPY, inserting from SELECT, unlogged tables, and loose counting.
Strategic 1.0.0 (Painless Strategy Pattern in Ruby and Rails)
The Strategic gem has been updated to better match the authentic Gang of Four Strategy Design Pattern, and has been finalized as 1.0.0 as a result. [more inside]
Glimmer DSL for SWT 4.19.0.0 Halved Startup Time
Glimmer DSL for SWT just had the biggest release in quite a while in version 4.19.0.0, upgrading to the newly released SWT 4.19 and cutting down the glimmer command startup time by half. [more inside]
Why is Ruby on Rails worth Investing in 2021?
The Ruby on Rails framework is still relevant in 2021. Here’s what makes the RoR framework perfect for web application development in this year. https://www.botreetechnologies.com/blog/why-is-ruby-on-rails-worth-investing/
Kiba ETL v4 (maintenance release) is out
Kiba ETL (a popular Ruby data processing framework) v4.0.0 is out! Go check it out and upgrade your apps: [more inside]
Live previews with Rails and Stimulus 2
If you ever wondered how to do live previews in Rails I looked into Hotwire and put together two approaches (with UJS and with Turbo Frame).
Better OOP Through Lazily-Instantiated Memoized Dependencies
The outside objects created or required by a particular class in order for it to function broadly are called dependencies. There are various schools of thought around how best to define those dependencies. Let’s learn about the one I prefer to use the majority of the time. It takes advantage of three techniques Ruby provides for us: variable-like method calls, lazy instantiation, and memoization.
Track Records Changes with PaperTrail gem
Want to track record changes in Ruby on Rails? You can easily use the PaperTrail Gem and track them without any hassle. Checkout guide on papertrail gem. https://www.botreetechnologies.com/blog/track-records-changes-with-papertrail-gem/