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.
What if I Tell You That Ruby on Rails Is Scalable
Scaling your Rails application is necessary when the number of user requests starts choking your server. We’ll describe in detail several techniques you can use to help your server function optimally. https://rubygarage.org/blog/ruby-on-rails-is-scalable
Ruby on Rails Web Application Vulnerabilities: How to Make Your App Secure
What do you know about web application security vulnerabilities? We’ll talk about attacks that can occur and how to protect against them.
SOLID Object-Oriented Design Principles with Ruby Examples
SOLID principles are five object-oriented design principles that help developers design flexible architectures that are easy to update and extend over time. In this post https://rubygarage.org/blog/solid-principles-of-ood we’ll talk about the practical side of applying SOLID design patterns and will provide examples in Ruby.
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. https://alexcastano.com/the-hidden-cost-of-the-invisible-queries-in-rails/
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. https://github.com/altmetric/fieldhand
An Object That Behaves Like a File?
Learn about StringIO, and object that can be used to replace files & user input in your tests. http://www.blackbytes.info/2017/05/stringio-objects/
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. https://github.com/westonganger/rearmed-js
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: https://semaphoreci.com/blog/2017/05/09/faster-rails-is-your-database-properly-indexed.html
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: https://www.chrisblunt.com/how-to-pass-data-from-rails-to-javascript-coffeescript/
Trailblazer on Rails: Basics - Setup & Use
Official Guide #3 for Trailblazer : Rails Basics http://trailblazer.to/guides/trailblazer/2.0/03-rails-basics.html
Facade Pattern as the way to implement Aggregate
Description of Facade Pattern and ideas of Domain-Driven Design. http://rubyblog.pro/2017/05/facade-pattern
How to Add Vue to a Rails 5.1 App
A short how-to on adding VueJS to a new Rails 5.1 project: http://www.rymcmahon.com/articles/10
Flaky tests: a short story
How I tracked down a flaky test and some tips on how to do it. https://www.ombulabs.com/blog/rspec/continuous-integration/how-to-track-down-a-flaky-test.html
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: http://mayurkumar.info/blog/user-confirmation-using-devise/
Active Admin 1.0
ActiveAdmin 1.0 was released with Rails 5.1 support for RailsConf http://www.varyonic.com/2017/04/active-admin-1-0/