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
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
In a recent blog post, we looked into the content_for view helper to render breadcrumbs. Once we got the feature working, it’s time to refactor the feature to lower technical debt. https://www.driftingruby.com/episodes/benchmarking-and-refactoring-the-content_for-view-helper
I designed a resource-oriented RESTful API micro framework. Here it is: https://github.com/travisliu/traim It is compatible with your legacy ActiveRecord models for easily turning them into JSON API. Designed for resource-oriented RESTful service without others per-request overhead makes it significantly faster than Rails-API
Safer “monkey patching” with Ruby’s Refinements. https://blog.alex-miller.co/ruby/2017/07/22/scope-the-monkey.html
I was playing around on a side project and needed to dynamically generate breadcrumbs. However, I wanted a simple and unobtrusive way to build them within the views. https://blog.driftingruby.com/hacking-content_for-to-create-a-simple-display-helper/
Hello, the new journaltxt (jo) library (gem) and command line tool - reads single-file Journal.TXT - the new human multi-document format for writers - and writes out (auto-builds) a blog (w/ Jekyll posts etc.). Reinventing blogging on the internets! Single-file publishing is the new single push-button publishing ;-) See the samples/Vienna.txt source and live Vienna.TXT Blog w/ Jekyll Minima as examples. Happy writing and publishing.
Tired of writing command line applications full of puts statements to create a user experience or present data in the terminal window? Have you ever wanted to easily create a tabular report after your application has collected the data? Then make sure to download and get started with the latest version of the Command Line Reporter project. It provides a simple DSL to accomplish many of the tasks you want in your scripts from Progress Bars to easily formatted tables. The wiki has plenty of information to get your started and the gem is available on rubygems.org with source on github.
In nil?, empty?, blank? in Ruby on Rails - what’s the difference actually? we dive into 3 commonly used methods to discover their similarities and differences. Many examples, some digressions and code from Rails included.
A few open source Rails apps using AngularJS, that developers can learn from or contribute to: https://gist.github.com/eliotsykes/a3a4322eff49a314f8c848c5300803c6
In this part of my ongoing series of articles on Rails 5 API apps, I’m discussing API versioning, how to do it in Rails, and why it’s a good idea.
Spreadsheet Architect is a library that allows you to create XLSX, ODS, or CSV spreadsheets easily from ActiveRecord relations, Plain Ruby classes, or predefined data. https://github.com/westonganger/spreadsheet_architect
To showcase using ActionCable in a Rails app with React, let’s explore how to use Rails, React, MobX, and websockets in a realtime location app.
This blog post is about the comparison of two popular gems of auditing and versioning in Rails. I have identified three fundamental questions that allow me to analyze the capacities of Audited and Paper Trail solving them.
5 Benefits of Immutable Objects Worth Considering for Your Next Project As a ruby developer, immutability is thrown around by functional programming aficionados for awhile. as a skeptic I've passed it off as a buzzword and kept moving along. I recently started learning elixir and it popped up again, so I wanted to get a deep understanding of what the concept is and how it benefits our software in the real-world...