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
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
In this article, we’re going to explore the following topics:
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]
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
In this article we’re going to explore the following topics:
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/
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 !!
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/
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
In the following article, we’re going to explore the following topics:
When thinking about more advanced OOP structure, one can sometimes ask – how to incorporate it into a Rails application? I will try to answer that question in this blog note, introducing some advanced OOP concept into a Rails application (without any architecture gems). [more inside]
What does the super keyword do in Ruby? How is super different from super()? Find out in this new article: https://www.rubyguides.com/2018/09/ruby-super-keyword/
In between my travels to Thailand and Japan I felt inspired by a Twitter conversation with Pieter Levels from Nomadlist.com where the main subject was how 100% bootstrapped (ie: no external investment) and fully-independent lifestyle business companies were not perceived as ambitious. [more inside]
Dokku lets you setup Rails hosting infrastructure on a simple VPS without much dev ops experience. Although it is easy to get started, a default config might result in very slow and unreliable deployments. In this blog post, I will describe how I’ve improved my Dokku based Ruby on Rails (NodeJS with Yarn and Webpack) application deployment speed by over 400% using a Docker image Dockerfile. [more inside]
A review and comparison of two books on patterns for writing better Ruby programs. http://sam-koblenski.blogspot.com/2018/09/tech-book-face-off-confident-ruby-vs.html
In our email marketing products, we changed our bloom filter implementation by using a custom Redis and an in-memory bloom filter written in Ruby. We will go through iterations at solving a real problem and writing a custom bloom filter from scratch. https://godaddy.github.io/2018/09/11/redis-ruby-bloom-filter/
https://revs.runtime-revolution.com/polyglot-content-in-a-rails-app-aed823854955 A look at how to internationalize your app using the Mobility gem and allow you to reach new markets and customers by allowing content to be translated. Feedback would be greatly appreciated!
https://berniechiu.github.io/blog/2018/09/10/refactor-legacy-controller-in-solid-pattern/ Refactoring controller action in a good SOLID practice