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.
Rails: Active Storage Basics (File Uploading) [Video]
Active Storage is now the preferred way to handle file uploads in rails. Whether you are handling images, documents or even videos Active Storage can help you.
Gem for ruby-graphql authorization
As ruby-graphql do not come with the built-in authorization support, we’ve come with our own solution https://github.com/anjlab/graphql_authorize . Right now we support only CanCanCan and Pundit for checking abilities (and of course passing procs), but it’s fairly easy to extend it. Feedback and contributions are welcome!
CodeDaze 2018 Buffalo, NY, a summary
The 2018 CodeDaze conference in Buffalo is a general topic tech conference with a lean towards tackling the real hard (people) problems. Talks by Avdi Grimm, Mark Bates, Coraline Ada Ehmke, Adrian Roselli, Kerri Miller, and other wonderful people: https://blog.phusion.nl/2018/09/19/codedaze-2018-buffalo-ny/
Why we're going from Ruby on Rails to JavaScript & Node.js
We’ve been using Ruby on Rails on our projects for so long, but for new ones, we’ll start to adopt JavaScript & Node.js. Find out exactly why at: Why we’re going from Ruby on Rails to JavaScript & Node.js
Fiddling with files & bots
WeTransfer’s Julik Tarkhanov and @GitHub Developer Advocate Don Goodman Wilson on file formatting and automating issue triaging at yesterday’s Amsterdam.rb, Amsterdam Ruby meetup: https://blog.phusion.nl/2018/09/19/fun-stuff-with-files-and-bots/
The Singleton module in Ruby
in this article we’re going to explore the following topics:
PostgreSQL vs MySQL
There are many databases out there but most web applications developed using an open-source web framework use either PostgreSQL or MySQL. I’ve been asked by many clients over the years why they should use PostgreSQL over MySQL for their Ruby on Rails application. [more inside]
Spyme gem released with Rails 5 support
Spyme is a gem let’s you automatically get the current geolocation of the visit and stores it in the session so you can persist it anyway you want. https://github.com/jvillarejo/spyme Please feel free to report any bug or changes that you need.
Dropping RHEL6, Debian 7 and Ruby 1.8 support
We’re considering dropping support in Passenger for RHEL/CentOS 6, Debian 7 and Ruby 1.8, these old distros slow down our development process and prevent us from using C++11. What do you think? Let us know: https://github.com/phusion/passenger/issues/2119
Migrating Passenger from C++ to Go?
When Passenger was created, C and C++ were our only viable options. But the language ecosystem has evolved and we’re considering switching to #Golang. WDYT? Let us know: https://github.com/phusion/passenger/issues/2118
The return Keyword in Ruby
In this article, we’re going to explore the following topics:
Start Internal portal application with Ruby on Rails in few minutes
This is part two of series “How to use DRG CMS for creating fully functional internal portal application” https://www.drgcms.org/blog/Damjan%20Rems/create-internal-portal-application-in-few-minutes-2018-09-13 . Installation should not take more then 5 minutes of your time. Most of the time will be spent on compiling nokogiri gem. [more inside]
Validating the Content-Type of Active Storage Attachments
Full validation support for Active Storage attachments won’t be arriving until Rails 6. Until then you’ll need to write your own custom validators to add this missing functionality. Last time I showed you how to write an attachment presence validator. Next I’ll share a validator which can restrict the content-type of your attachments. Drop this bit of code and its accompanying RSpec matcher into your project to tide you over until the next Rails release. http://www.carlosramireziii.com/validating-the-content-type-of-active-storage-attachments.html
The nil value in Ruby
In this article we’re going to explore the following topics:
CanCanCan that scales
A simple explanation on how to use CanCanCan so that it scales with your application and does not impact your performances. The method is very simple and allows you to separate permissions for each model as Pundit does. [more inside]
Released benchmark-perf with new api
benchmark-perf changes its run apis to be stateless calls with keyword args and the time measurements to be more accurate.
New release of persistent-💎 gem with full support for TruffleRuby!
The latest release of the persistent-💎 (“persistent-dmnd”) gem is out, with full support for TruffleRuby 1.0! Now your Ruby can be fast and beautiful https://gitlab.com/ivoanjo/persistent-dmnd/
A self hosted Medium platform built with Ruby on Rails
https://github.com/michelson/dante-stories This project is a fork of a Medium clone which began as Ken Hibino’s personal side project to learn Ruby on Rails and ReactJS. I’ve upgraded and refactored some parts of the rails app and I’ve integrated Dante2 wysiwyg editor. Try it out, it’s awesome !!
Caching Docker Rails images using master image
Blog post about improving Docker images built process in terms of required storage and build time using “master” build technique. https://blog.jedrychowski.org/2018/caching-docker-rails-images/
Adding an Attachment Presence Validator to Active Storage
If you’re using Active Storage, you should know that it does not (yet) provide a way to validate the presence of an attachment. Unlike Paperclip or the other popular file upload gems, there’s no validates_attachment_presence method you can use. Luckily it’s pretty easy to roll this out ourselves. I’ll share the custom validator code that I use to add in the missing validator in this post: http://www.carlosramireziii.com/adding-an-attachment-validator-to-active-storage.html
Alias in Ruby
In the following article, we’re going to explore the following topics:
How to: Road to fast and stable test suite
I’ve blogged http://bit.ly/testing-sanity-p1 - extension to my presentation from last RUG::B meetup, feedback is welcomed, especially that this is my first post ever 👾
Entendiendo la metaprogramación con Ruby
¿Qué es la metaprogramación y como es aplicada dentro del lenguaje Ruby? [more inside]