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.
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?
FXRuby Enhancement
If you need a quick and powerful way to put together a Ruby GUI application, here’s an enhancement to the FXRuby FOX Toolkit wrapper. It’s been reworked to make it more appealing for Rubyists. [more inside]
Rescue's Elegant Trick for Knowing Which Exceptions to Catch
You probably know how to ask Ruby to rescue specific exceptions. But how does Ruby know if a particular exception meets your criteria? In this article, we’ll walk through Ruby’s simple exception matching mechanism and see how we can use it to our advantage. - http://blog.honeybadger.io/ruby-rescue-elegant-trick-for-knowing-which-exceptions-to-catch/
Ruby wrapper around REST Countries API http://restcountries.eu
Basic API implementation for REST Countries API http://restcountries.eu [more inside]
binding.irb now available in Ruby 2.4
binding.irb similar to binding.pry is now available by default in Ruby 2.4 http://blog.redpanthers.co/new-binding-irb-introduced-ruby-2-4/
act-form - new gem help you to build form object!
ActForm is the gem that provide a simple way to create form object or command object or service object, it only depends on activemodel >= 5 and provides few api.
Jekyll Talks Theme - Write Your (Ruby) Talks in Markdown - Auto-Builds w/ GitHubPages
I’ve put together a ready-to-fork static site theme (for jekyll and github pages) that lets you write your talks in plain text with markdown formating. See a live demo @ henrythemes.github.io/jekyll-talks-theme ». Sample talks include:
1) Dr Jekyll and Mr Hyde - Build Static (Web) Sites w/ Ruby - (Slides), (Source: drjekyll.md)
2) Stay Static - Jekyll vs Middleman - Build Static (Web) Sites w/ Ruby - (Slides), (Source: jekyll_vs_middleman.md)
3) Starter Sample (Blank Theme) - Habits - (Slides), (Source: starter.md)
4) Starter Sample (Blank5 Theme) - Habits - (Slides), (Source: starter5.md). Happy publishing w/ Jekyll. Cheers.
Creating data backed tables with Tabular and Ruby on Rails
A quick tutorial on how to build a data table with Tabular, a jQuery plugin, and Ruby on Rails. Tabular is a event and plugin based library, providing standard table functionality such as searching, sorting, pagination, etc..
Specifying parameters encoding by action in Rails
Learn how to accept parameters in different encoding than UTF-8 with a new feature coming to Rails. [more inside]
Use Elm in Rails 5 asset pipeline
Hi, i created small gem which should help you with using Elm in Rails 5 asset pipeline: [more inside]
Treat your dependencies like your own code
See how using version ranges in your gemspec results in nondeterministic Travis builds. One way of improving the situation is to treat your dependencies like your own code and trigger builds for dependency updates. So you can be sure your gem is working all the time.
What The Heck is Heap Fragmentation, and Why Should You Care?
The goal of Ruby 3 is to be three times faster than Ruby 2, but how? In this article we’ll discuss one performance bottleneck: heap fragmentation. You’ll learn how something as low-level as OS memory management can have real performance impacts on your Ruby apps. http://blog.url.com/blog/2017/01/10/heap-fragmentation-os-memory-management-ruby.html
"Ruby is still great"
After spending some time with The Hot New Stuffs (Elixir, Phoenix, Elm), I also realized just how much I still love Ruby, and why.
Introduction to writing a rack middleware
Beginner level article: on writing your own rack middleware. http://blog.redpanthers.co/rack-middleware/
State of the 2017 Rails Stack
Are folks upgrading to Rails 5? Where is the Postgres vs. MySQL battle heading? Are devs embracing Puma and concurrency? The results of the State of the 2017 Rails Stack by Scout.
Explaining Hanami from a Rails perspective
Checkout the first part of a series of articles explaining how to write an app in Hanami, comparing to Rails: From Rails to Hanami: Models
Guide for Documenting Your Rails API with Swagger
Checkout my latest article Do the Right Thing and Document Your Rails API with Swagger to know about documenting Rails API with Swagger published on SitePoint. [more inside]
Going HTTPS-only with Let's Encrypt
I wrote a brief call to action about using Let’s Encrypt to take Rails apps HTTPS-only, along with a couple of things to watch for along the way. Be ready for security changes coming in Chrome!