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.
Trailblazer Newsletter May 2016
The May 2016 newsletter discusses Cells 4.1, how it simplifies layouts and makes ActionView redundant, TRB and Hanami’s increasing gravity and what’s been happening in the Ruby community this month.
Improving open-uri
Open-uri is a part of Ruby standard library, and for me it’s the simplest way to download files from URL. However, it has its limitations, quirks, and also security issues, so I made a wrapper around open-uri which aims to address these issues.
Ruby Methods for Type Conversion and Equalness
Idiosyncratic Ruby takes a detailed look at two rather confusing APIs of Ruby: Methods of type conversion and the different kinds equalness
New version of pluck_to_hash gem now supports pluck_to_struct
Just released new version of pluck_to_hash gem. It now supports pluck_to_struct method leading to even more cleaner code. https://github.com/girishso/pluck_to_hash
A better way to do Rails tutorials
In this post, I will show you how you can master, any Rails tutorial. I use authentication as an example.
How to use different primary key in Rails with MySQL?
Want to use different primary key field over default id? Want to use different data type for primary key? [more inside]
How To Implement Simple Authentication Without Devise
Devise gives you a lot of functionality out of the box, but it can also be frustrating. Authentication is actually pretty simple! This article shows a tiny web app with a simple manual implementation, in under 100 lines of code: http://www.rubypigeon.com/posts/how-to-implement-simple-authentication-without-devise/
Delayed Job Queue Fairness
This week on the Salsify Engineering Blog we tackle the difficult topic of ensuring fair distribution of delayed job processing resources across tenants in a multi-tenant SaaS application. Check out the post! http://blog.salsify.com/engineering/queue-fairness
Refactoring of CreateSend library, part 2
Continued refactoring of an OSS project. If you get bored, skip to step 6. http://rubyclarity.com/2016/05/createsend-refactoring-part-2/
Rails has won: The Elephant in the Room
Many people are worried about the current state of Rails. Many are choosing to leave the Ruby community altogether. Are all these concerns really something you should also worry about? They are not wrong. But I think there is more context to it. Let me explain.
[Video] Docker: Rails Worker Process and Redis Service
In this episode we show you how to run a worker service using docker. We will be specifically focussing on sidekiq, and getting all that hooked up to the redis service also running with docker.
[Screencast] Eager Loading with Goldiloader
Wouldn’t it be awesome if ActiveRecord didn’t make you think about eager loading and it just did the “right” thing by default? With Goldiloader it can! https://www.driftingruby.com/episodes/eager-loading-with-goldiloader
Evaluating (Ruby) Libraries
Whenever we have a problem where there are libraries that solve that problem, we should be mindful which library we will choose. Often there will be many alternatives: web frameworks, ORMs, authentication frameworks etc. When evaluating these alternatives it’s important that we use good criteria.
Trailblazer In 20 Minutes (Actually, Even Less)
Understanding the essential elements of Trailblazer and its high-level architecture doesn’t take longer than 20 minutes. Once you leave the “MVC” mindset and allow Trailblazer to show how it restructures applications, defines strong conventions where code should sit, and how objects interact, it is just another stack in your repertoire.
Password-less authentication in Rails
In my blog post i write about password less authentication in Rails. What are the benefits and code example itself. Read it here: http://masa331.github.io/2016/05/21/passwordless-authentication-in-rails.html
Visible Constants
Ruby Constants: Not only can they be made private, but also marked as deprecated. And the answer to how many constants get defined initially is: 958
A bit about decorators and presenters
Dive in to the decorator and presenter pattern and see what makes them simillar, but unique. Check it out here.
Building Fast & Resilient Web Applications
Carving out the fast path is not enough. We need to make our applications resilient: anticipate failures, and detect and adapt to them at runtime.
Shrine 2.0 Released
Shrine is a full-featured library for handling file uploads, which attempts to address the limitations of existing solutions. I wrote about what has improved since version 1.0, as well as some plans for the future.
A Content Security Policy (CSP) strategy
A Content Security Policy is a great way to reduce or completely remove the number 1 web app security vulnerability – Cross-Site Scripting (XSS). You’ll need a strategy to introduce it, though.