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.
[Gem] Mecha - Rails apps generator
Mecha generates Rails apps with some defaults. [more inside]
[Screencast] Drag and Drop with Interact.js
Using Interact.js to create draggable and droppable items in our view, we can use AJAX callbacks on events to interact with our Ruby on Rails application. Also, learn how to use Ruby Assets to manage our Javascript Libraries. https://www.driftingruby.com/episodes/drag-and-drop-with-interact-js
pluto.starter - planet quick starter kit - (auto-)build yr own (static) news sites
Hello, I’ve put together pluto.starter - a new quick starter boilerplate / setup / ready-to-fork repo for planet pluto that lets you (auto-) build your own (static) planet news sites from web feeds w/ ruby in minutes. Step 0: Download and Unpack (or Clone). Step 1: Install the Planet Pluto Machinery / Tool. Step 2: Build the Starter Planet. That’s it. Cheers. Happy planet. PS: Why not design your own planet themes? It’s just embedded ruby (ERB) with Rails-style helpers (link_to, stylesheet_link_tag, etc.), see planet.starter.html.erb to get started.
Had bad experience with Rails Flash messages?
Handy cheat sheet for flash messages in Rails: https://medium.com/@mayurt20/handy-cheat-sheet-for-flash-messages-in-rails-ed6ebdb6cd31
🤖 Unicode::Emoji
The unicode-emoji gem provides a regex to match for basic emoticons and the various emoji sequences, like modifier sequences, region sequences, sub-region sequences, keycap sequences, and ZWJ sequences!
How to Define Classes in Ruby
Everything in Ruby is an object and this post shows how to define one, take a look: https://merubygirl.wordpress.com/2017/04/09/english-version-classes-101-class-new/ [more inside]
Stripe webhooks in Connect applications
I have recently implemented Stripe webhook integration for my application that uses Stripe Connect with managed accounts. As it turned out, the process for working with webhook events in Connect applications is slightly different, and there is no official documentation or public blog posts that cover these nuances. This short write-up is meant to bridge this gap https://medium.com/@koss_lebedev/stripe-webhooks-in-connect-applications-a7d71bdd44e1
Reliable notifications between two apps or microservices
Let’s say you have 2 systems or microservices (or processes). And one of them needs to be notified when something happened in another one. You might believe it is not so hard unless you start thinking about networking, reliability, and consistency. [more inside]
TheOpenCMS. Weekly report #5
Hi there! The Adventure of TheOpenCMS project continues. Changelog vol. 5
Automatically generate the Devise acceptance tests
devise-specs is a Rails generator that adds the Devise authentication acceptance tests when you run the devise generator. https://github.com/andrii/devise-specs
Switch users with UserSwitch
UserSwitch is a Rails plugin for switching between commonly used roles and users. It’s particularly useful for development and staging environments when you often need to switch between various accounts. It saves you from the hassle of logging in or out. https://blog.kodius.io/2017/04/07/userswitch/
Unit testing with VCR
In this blog post, I’ll show you a simple way to test applications that perform external service requests, in Ruby, using the VCR gem! Enjoy: https://revs.runtime-revolution.com/unit-testing-with-vcr-5dd2bb5c9012
New Horizons - Build Your Own (Static) Planet News Site w/ Pluto (and Ruby)
Hello, from yesterday’s Vienna.rb meetup - all about reading web feeds with ruby and building your own planet news sites. Browse the talk notes titled New Horizons - Build Your Own (Static) Planet News Site w/ Pluto (and Ruby) or the slide deck. Bonus: Includes pluto trivia quizes. Happy planet. Cheers. PS: Build the next Planet Ruby - anyone?
Protect Your Rails Apps from Bots, Scrappers and DDoS attacks
No gems required. This tutorial will walk you through using AWS WAF with your Rails apps. Protect Your Rails Apps from Bots, Scrappers and DDoS attacks
What is the best strategy for encrypting files in Ruby
I am going to show you how the encryption flow actually works using some Ruby code. We will use 4096-bit key lengths and SHA-256 as our digest function. https://blog.active-bridge.com/what-is-the-best-strategy-for-encrypting-files-in-ruby#post
Conditional Eager Loading in Rails
Find out how you can filter eager loaded associations in Rails. https://revs.runtime-revolution.com/conditional-eager-loading-in-rails-9b1c1c592897
Hanami v1.0.0
Production ready, new team members, new governance for the project. http://hanamirb.org/blog/2017/04/06/announcing-hanami-100.html
Adding rubocop to a legacy project
Adding rubocop to an existing legacy project can be done in 20 minutes with some iterations and use of autogeneration of a .rubocop_todo.yml. http://www.rojotek.com/blog/2017/04/06/adding-rubocop-to-a-legacy-project/
Fae - CMS for Rails. For Reals.
We recently open sourced a Rails CMS engine that we’ve been developing and using internally for a couple years. Check it out! https://www.faecms.com/
Versioning a Rails API
Introducing versions into an API application doesn’t have to be difficult or divisive. If you understand why you might need it and how best to implement it, the process can be done before you know it.
Testing a New Page Loaded (or not) with Capybara
Mmm, you probably won’t need this. Its a replace_page matcher for testing that a page was (or was not) reloaded and have no other way of checking https://www.wetestrails.com/blog/capybara-test-page-loaded
5 Tips for More Effective Capybara Tests
I wrote an article about some handy features in Capybara to help people write better tests. Here’s the link.
Importing invalid legacy data with Rails
I just wrote a new blog post on my recent experience in importing legacy data with Rails.
Tracepoint and Array#size
Notes about some interesting behaviors around Tracepoint and Array#size.