Rails 5.2, Ruby 2.5.9, serialization and unknown keywords: permitted_classes, aliases

I wrote here few times here about quirks working with older Rails application. For example, upgrading old app to some more up-to-date toolset can be challenging. In my opinion it is best done step by step, so having 4.0 Rails app it is much more challenging to upgrade right to 6.1 will be very hard. …

Working with old Rails 2.4 on Ubuntu 20.04

Installing old Rails 2.4 (well, somebody need to maintain that legacy code…) on Ubuntu with Ruby 2.4.10 You can get failure during Nokogirii installation. Log ends with: compiling xslt_stylesheet.c xslt_stylesheet.c:112:13: warning: ‘swallow_superfluous_xml_errors’ defined but not used [-Wunused-function] 112 | static void swallow_superfluous_xml_errors(void * userdata, xmlErrorPtr error, …) | ^~~~~~~~~~ cc1: warning: unrecognized command line option …

Rails – skip validation in inherited classes.

Doing refactor in one of my applications I had to change behavior of single model. Since that was not total rewrite but just workflow change and I wanted to do A/B tests I needed both versions working. Instead of writing completely new model I opted for using class inherited from old version. New class should …

When will_paginate renders strange URLs after Rails upgrade to 3.2

To be honest I didn’t expect I will write again here at this blog. But good news I did manage to find some time to write! Since 2011 I’m not freelancing anymore, but all the time I use Rails in Nettigo. Codebase used there has it’s roots in Rails 1.2 or even earlier release – …

Passing current user id to Rails models

Long time since last post, isn’t it? Well, I’m completely busy with my work in Nettigo, selling Arduinos and other nice gears :) I do not do gigs anymore, so there is a lot less reasons to write about Rails. But I still use this framework, since my backend software is written in Rails, so …