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.
Best Ruby on Rails Content Management Systems (CMS)
With a ready Content Management System, it’s simple to control all the content on your website. We’ll review several Rails-based CMSs that you can use to rapidly build a website.
The hidden cost of the invisible queries in Rails
Making SQL queries in Rails is very nice. However, there are some edge cases where the Rails syntax will surprise you. In this article, we explore some of them and we propose different ways to make our Rails application faster.
MediaWiktory, The MediaWiki Client
The task of wrapping MediaWiki (wikipedia, wikidata, wiktionary, wikia.com….) API is pretty challenging. MediaWiktory is the first MediaWiki API client that handles (almost) all the quirks gracefully, is well-documented and clear.
Fieldhand: A Ruby library for speedily harvesting OAI-PMH repositories
A complete Ruby implementation of the Open Archives Initiative Protocol for Metadata Harvesting wrapped up in a simple client library with speedy XML parsing and fully automatic handling of pagination.
An Object That Behaves Like a File?
Learn about StringIO, and object that can be used to replace files & user input in your tests.
How to achieve parallelism with Ruby MRI with I/O bound threads
How to achieve parallelism with Ruby MRI with I/O bound threads
Have you ever delayed a Rails upgrade?
With the release of Rails 5.1, you might be eager to get your Rails app up to date. But you may also be several versions behind. If you’ve ever put off a Rails update, we’d love to hear from you. Did your manager not want to prioritize an update? Was your app fragile or lacking test coverage? Was a key gem causing issues? Tell us your Rails update story and we’ll include a quote and link to your Github/Twitter on our blog!
Rearmed-JS v1.0.0 Released! - Make your JS code relaxing and readable
While working with some basic constructs in Javascript, I always get choked up trying to do something that should have been a dead simple iteration method or string method in Ruby, yet it ends up being the most disgusting code ever. Well I just released my plugin Rearmed-JS that solves a large part of this problem by taking inspiration from Ruby. This library is a collection of helpful methods and monkey patches for Arrays, Objects, Numbers, and Strings that will make your code more relaxing and more readable by taking inspiration from Ruby. Works in the browser and NodeJS.
Faster Rails: Is Your Database Properly Indexed?
If your Rails app is getting slower, here are some tips on how you can make your Active Record queries faster:
A Decorator vs. a Subclass
Rails 5.1 added a great new feature, delegate_missing_to. With delegate_missing_to, any method that you can’t find on one object is called on another object, instead. In the pull request, DHH said it makes it easier to build decorators. But what is a decorator? And why would you use one instead of a subclass?
How to Pass Data From Rails to Javascript / Coffeescript
A quick tutorial showing how to pass data/variables from Rails to Javascript/Coffeescript:
Trailblazer on Rails: Basics - Setup & Use
Official Guide #3 for Trailblazer : Rails Basics
Facade Pattern as the way to implement Aggregate
Description of Facade Pattern and ideas of Domain-Driven Design.
How to Add Vue to a Rails 5.1 App
A short how-to on adding VueJS to a new Rails 5.1 project:
Flaky tests: a short story
How I tracked down a flaky test and some tips on how to do it.
Tocer 5.0.0
Tocer (a.k.a. Table of Contenter) makes it easy to maintain the table of contents of your Markdown files. This improves the readability, adoption, and navigation of your private/public projects. This release includes safe defaults (i.e. README.md) and improved whitelist support. You can target specific files, wildcard files (i.e. *.md), or traverse all sub-directories for certain files (i.e. **/*.md). [more inside]
[Screencast] Mountable Engines
Mountable Engines are a great way to extract code into its own namespace and allow the code to be reused in other applications. Other popular gems that are mountable engines are Devise and Doorkeeper. https://www.driftingruby.com/episodes/rails-engines
User Confirmation using Devise
Do you want to send the confirmation email to users ?? See how to build rails application for this feature here:
Active Admin 1.0
ActiveAdmin 1.0 was released with Rails 5.1 support for RailsConf
How to download PDF's with the new Chromium Plugin API and Capybara
I’ve covered the setup for capybara chrome driver -
Using ruby and git to share project code with temporary team member
Did you know we can share our project by simply serving our .git folder? It is just 4 commands in total. - Read Full Article
Using Vue.js for Nested Forms in Rails
You can pretty easily use Vue.js to build out dynamic nested forms in Rails. This two-part screencast, we explore how you can use Vue.js to easily handle creating new records, editing existing ones, and also deleting entries. [more inside]