Categories

Blog categories

Code

Code

Blog Posts


Posted by Ziyan Junaideen 28 June 2020
Every developer values code highlighting and theming. This is how you can handle syntax highlighting in your Rails project.
Posted by Ziyan Junaideen 04 March 2021
Fixing rbenv based Ruby installation on a Vagrant VM running Ubuntu following the installation of ZSH and oh-my-zsh.
Posted by Ziyan Junaideen 05 June 2020
Code deploys failed. Connection to port 22 was timing out. I thought it was a Github issue or a firewall issue. But it turned out to be an issue with SSH. The config I used to get deploys operational.
Posted by Ziyan Junaideen 13 March 2021
In Rails & UJS - how would you execute a JS layout of one resource from within another resource? You could render it as a layout and include or you can make a request to the route.
Posted by Ziyan Junaideen 28 August 2020
IFrames are useful tools to integrate one service to another. For example, a church website to include a donation page from a donation management platform. This is how you can make such automatically resize to fit content.
Posted by Ziyan Junaideen 24 June 2020
Custom Rails validator classes can help clean up your model code. How would you test your custom Validator using RSpec?
Posted by Ziyan Junaideen 10 March 2021
Is your development environment using Vagrant? You are saving the files but the Rails server / application is not detecting and auto updating file changes? Here is how you can get it resolved.
Posted by Ziyan Junaideen 22 March 2021
Reduce form submission spam using a combination of reCaptcha V2 and V3. V3 will give a seamless submission experience to general users and prompt for validation using V2 on suspicion.
Posted by Ziyan Junaideen 28 March 2021
Install webpacker in your Ruby on Rails 4.2+ project to manage client side libraries in a sane way.
Posted by Ziyan Junaideen 28 June 2020
The reCaptcha GEM is not built to handle different configurations of reCaptcha (ex: V2 vs V3 or as I hear V2 Checkbox vs V2 Hidden). If you need to to use another version you will have to rig up your own implementation.
Posted by Ziyan Junaideen 18 March 2021
Its hard to imagine a web-development project that doesn't have FontAwesome. This is How you can install and configure FontAwesome (free) using Webpacker in Ruby on Rails 6.
Posted by Ziyan Junaideen 05 March 2021
Upgrading Ahoy lead to a Rails routing error - No route match [POST] "/ahoy/events" which was a result of not enabling Ahoy.api.