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.
Scale your Elasticsearch queries with filtered aliases
Learn how to scale-up your Elasticsearch usage through filtered aliases. The examples provided use Ruby and the elasticsearch-ruby gem.
Writing Clean Monkey Patches (Fixing Kaminari v1.0.0 ArgumentError)
In this article we delve into some clean monkey patching and fix an error with the latest version of Kaminari until the project releases a new version. https://solidfoundationwebdev.com/blog/posts/writing-clean-monkey-patches-fixing-kaminari-1-0-0-argumenterror-comparison-of-fixnum-with-string-failed
Introduction to the JSON API spec and Active Model Serializers
This weeks’ screencast covers the basics of Active Model Serializers and the JSON API spec for Rails to help you implement consistent, cacheable, and efficient JSON for your Rails APIs.
KaTeX bindings for Ruby
You can now render render TeX as HTML from Ruby via KaTeX, using the KaTeX gem. ✨
Packing & Unpacking: A Guide to Reading Binary Data in Ruby
How do you read binary files like PNG, EXE & ZIP? What is the best way to handle binary data in Ruby? http://www.blackbytes.info/2017/01/read-binary-data/
Is Ruby dead? Hell no! - Analysing RubyGems stats for 2016
Another year is behind us and many things have changed in the web development world. We did a little research on the use of Ruby gems and created some stats for 2016 which prove that Ruby is doing very well! Check out our blog post for more detail.
Passenger 5.1 released with major improvements in robustness, security, efficiency
Passenger 5.1 contains various improvements for minimizing and preventing down time, introduces more secure defaults and defense in depth, has become faster and uses resources more efficiently, improves developer productivity and updates various ecosystem integrations to stay ahead of the curve.
Complex Sorting in ActiveRecord
The thought process behind creating a simple object to help deal with complex ActiveRecord ORDER BY queries with a strong focus on the Single Responsibility Principal. [more inside]
Roar 1.1 and Roar JSON API 0.0.1 released!
Roar, the library for consuming and rendering REST API documents, has reached version 1.1! The new release includes compatibility with Representable 3.0 and various bug fixes. [more inside]
Ruby Survey Results (January 2017)
Here are the results from a Ruby survey I posted a couple of weeks ago. https://jasoncharnes.com/2017/01/16/ruby-survey-results-jan-2017/
Keep track of your #100DaysOfCode progress with 1hdoc
Are you joining #100DaysOfCode? 1hdoc makes easy to register and sync your progress. [more inside]
Listing the status of your migrations in Rails
db:migrate:status is a hidden treasure for checking the status of your migrations. It gives you an overview which migrations are applied, and which are still missing. https://christoph.luppri.ch/articles/2017/01/16/listing-all-your-migrations-status-in-rails/
Code reviewing as a mindset
I wrote this post about why I love code reviews, and my approach to them. I wound up taking the Ruby-specific stuff out, but hopefully you still find it useful.
[Screencast] Client Side Encryption
Add an extra level of security to your application with client side encryption. Even over an SSL connection, there are attacks which could expose your users’ sensitive information. Using JSEncrypt, learn how to encrypt on the client side and decrypt on the server side. https://www.driftingruby.com/episodes/client-side-encryption
tty-command v0.3.0 release
Newest tty-command adds ability to enumerate over the command standard output.
schemadoc - document your database schemas (tables, columns, etc.) w/ Jekyll
Hello, I’ve updated the schemadoc-theme that lets you document your database schema, that is, tables, columns, etc. using a github pages (jekyll) theme / site. See the /schemadoc github org for more. Questions and comments welcome. Happy publishing (and documenting) w/ Jekyll. Cheers.
WrenchMode, a simple maintenance page gem and Heroku add-on
WrenchMode allows you to create a hassle-free and customizable maintenance page for your rails app with live updates and ip whitelisting. You can read about Heroku implementation here: A Better Heroku Maintenance Mode
Hello, Pages! Theme - Easy 1-2-3 Publishing w/ GitHub Pages (and Jekyll) Live Sample
Hello, I’ve put together a (simple) sample (static) website called Hello, Pages! (Source) using the latest and greatest built-in Jekyll plugins e.g. Optional Front Matter, README Index, Default Layout, and Titles from Headings that let you publish pages on GitHub without any configuration or front matter blocks e.g. just add some pages in plain text with markdown formatting. That’s it. Happy publishing w/ Jekyll. Cheers. PS: Bonus: I’ve added the Hello, Pages! V2 (Source) sample w/ custom layout, github banner, footer (w/ build time) and more.
How we've used Segment with Solidus ecommerce
We’ve currently integrated Segment in Solidus (fork of Spree) and wrote about what we’ve learned. Have a read there https://www.cookieshq.co.uk/posts/how-we-use-segment-with-solidus-spree
Rails 5 and ActiveRecord before_destroy callbacks
I recently stumbled in one of Rails 5 new breaking feature that somehow flew under my radar. It’s not a very recent change, still it’s the case that many others (at least at my company) missed it. I think that’ a good reason for talking a bit (more) about it: How requirements shaped my code, AKA Rails 5 and ActiveRecord before_destroy callbacks.
Re: What is the splat operator doing here?
This is a response to a question I received on a Ruby macro I wrote which uses the splat operator heavily. Here I describe the two different behaviors of the splat operator and detail how the macro works. Re: What is the splat operator doing here?