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.
[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.
Domain Events over Active Record Callbacks
There has been a lot of discussion recently over AR callbacks. What are their good and bad consequences and so on. Check out the alternative approach. Domain Events over Active Record Callbacks
Join a Ruby Remote Meetup
If you would like to join a Ruby Remote Meetup group: [more inside]
The low-down on Ruby Modules
A visual representation on what we can do with Modules and how they fit into the Ruby Object Model https://www.sitepoint.com/get-the-low-down-on-ruby-modules/
The Right Format
Examples of all formatting types and flags for sprintf formatted strings [more inside]
xray-rails: Quickly identify and edit Rails views in the browser
Just add xray-rails to the development group your Gemfile. Now you can press SHIFT+CMD+X (Mac) or SHIFT+CTRL+X (others) for a visual breakdown in your browser of all the Rails layouts, views, and partials that rendered the page. Click anywhere on the page to launch your preferred code editor for the corresponding Rails view. Now with Rails 5 support!
A change-positive Ruby web application architecture
A look past Rails, past MVC, towards a web application architecture that promotes ease of change: http://icelab.com.au/articles/a-change-positive-ruby-web-application-architecture/
Docker: Running a Rails App Container with Elasticsearch Service
In this episode Zack Siri declares his love for error messages and show you how to connect your rails app container to an elasticsearch service. We also show you how to configure your elasticsearch container by modifying the config file.
RSpec and Rails are Mocking Me
This post is about a very small Rails design decision. A Rails design decision that I’ve made over and over without thinking about it. You probably have, too. And then a weird test failure made me think about it. And then it made me overthink it.
Building Microservices with Docker and the Rails API gem
Charles Wang sets up a basic Rails API app as a microservice. Microservices provide loose coupling, strong cohesion, independent deploys, and much more.
5 Useful Examples From The Ruby Standard Library
The Ruby Standard Library has some useful classes & methods, in this post I show 5 examples. http://www.blackbytes.info/2016/05/ruby-standard-library/
Don't just DRY your code, DRY your tests too!
I’m a big fan of having small classes. I’m not a big fan of having huge specs for a small class/object. Every time I see an opportunity to DRY my specs, I take it. [more inside]
Maintaining a consistent coding style across projects with house_style
When using RuboCop, maintaining a consistent style across multiple projects can be a chore if you manage the configuration yourself. house_style is our solution. Read about the thinking behind it, and how we set it up within each application, on our blog post: [more inside]