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.
Extending git with Ruby
Git offers some extension hooks that can be used to make our lives easier, I wrote this blog post to explain how you can take advantage of them using ruby.
Two Rails Based Elasticsearch vs Postgres Benchmarks
Sites like Amazon can use Sub Aggregations and Simple Aggregations to quickly get category and brand counts for millions of products. These posts compare the performance differences and offer some insight into using searchkick for elasticsearch and Rails for postgres to determine speed differences.
Postgres: Adding foreign keys with zero downtime
This blog post discusses foreign key migrations, which have consistently burned me in Rails. It’s only vaguely related to Ruby, but I thought I’d share. There is a PR in Rails to hopefully make these migrations a little easier in the future.
Giving super powers to Rails nested forms with Vue.js
I decided to try vuejs.org to implement dynamic nested forms and I really liked the result. For more details and code:
When Method Names Should Go Out with a Bang
Why do some methods in Ruby end with an exclamation mark while others don’t? This quick post explains the bang convention. http://www.rubyletter.com/blog/2017/01/31/when-to-use-ruby-bang.html
RSpec Refactoring Patterns: Extract Matcher
Extract Matcher is good for when you’ve got one or more expectations verifying state. By extracting well-named matchers, you can make the spec more readable. More at (with code samples)
Working with the Evernote API in Rails
The Evernote API offers superb leverage for harnessing your data. You can improve on the Evernote ecosystem by bringing your technology to the table. Read more.
Blazer - a great tool to see what (data) you get
No matter what kind of online business you run, you also collect some data. To be honest we collect and store more and more data nowadays. The problem is that almost no one understands collected data and it cannot be used to make better business decisions. Read more
Flash card game Language Cards 0.1.0 has been released!
Cross-platform compatible command line flash card game for learning foreign languages with full internationalization support (I18n) and the ability to easily add flash cards with YAML files of your own. See: language_cards This version update features game mode swapping between translation-practice and typing-practice. Lots of code refactoring and added support for using a home sub-directory for adding flash-card files, or translation files.
Adding "Cart" feature to your KMS-powered website
Adding “Cart” feature to your website has never been so easy before KMS Shop release. Check out this extension:
How To Test Ruby CLI: Code Generators
One of the most difficult tasks I met during Hanami development is to write integration tests for the Command Line Interface (CLI). This challenge required a deep knowledge of the Ruby toolchain.
How to Integrate Bootstrap 4 with Rails 5
Learn how to integrate Twitter Bootstrap 4 with Rails 5 without using any gem. Faster upgrades and no gem dependencies? Sounds good to me!
Login as another user with devise_masquerade
This week on GoRails, we cover impersonating other users with the devise_masquerade gem.
JQuery-Free Rails and Legacy Browsers
Rails 5.1 will no longer depend on JQuery. I ran the UJS test suite on several versions of IE to see how nicely the new system plays with legacy browsers. - http://blog.honeybadger.io/jquery-free-rails-and-legacy-browsers/
Lite Cable – Rails-free Action Cable
Lite Cable (https://github.com/palkan/litecable) is a lightweight Action Cable implementation with business logic (channels, streams, etc) separated from low-level server implementation. Read more
How hash became faster in Ruby 2.4
The internal implementation of hash was changed in Ruby 2.4, such that it became faster out of the box.
Merge sidekiq jobs for bulk notifications
I made sidekiq middleware which enables to merge jobs occurring before the execution time. Please check and try it and tell me your feedbacks! Read more
Mastering Roda eBook
I’m in the process of writing an eBook about Roda. Read more
Learn how to achieve parallelism with Ruby MRI using I/O bound threads
Even with MRI’s GIL, you can achieve parallelism with Ruby when using IO-bound threads.
Thredded v0.9.4: Post preview, math, and more
Thredded, the best Rails forums engine, has just released v0.9.4. This release adds preview-as-you-type, a server-side rendered math plugin via KaTeX, and more. Read more
Event Sourcing - a practical example using Ruby
A blog article where I show how the many different concepts of event sourcing can come together.
SmartSeeds - gem for smart auto generating of new records with random values
It determines types of fields(attributes) of an ActiveRecord model and creates records with random values for each of these attributes. Read more
Adding Active Admin to a Rails 5 API Application
Rails 5 API applications don’t include the view-rendering functionality that Active Admin (and other admin dashboard gems) require in order to work. Nonetheless, we still want to use those admin panels to visualize and manage our API data, without having to abandon API-mode altogether. Here’s how to have the best of both worlds by installing Active Admin on a Rails 5 API-only app
ROM 3.0 Released
Check out the official announcement of rom 3.0.0 that ships with rom-sql 1.0.0 and rom-repository 1.0.0.