Quick Rails Tips – Empty ActiveRecord Association return initialize


Just a quick tip for Ruby on Rails today. I saw a few people (including me some time ago!) struggling with the fact that sometimes you return a valid ActiveRecord association, and sometimes you return nil (or an empty array). That makes things further down the pipe a bit of a hassle. But there is an easier way!

Some people online just talk – I just do. One of my major SaaS products out there is Zonmaster.com (https://public.zonmaster.com) THE AutoResponder and Customer Management tool for Amazon Sellers. Join over 17,000 other Amazon Sellers and sign up today!

Looking for great hosting? I’ve been using DigitalOcean for 7 years and they have never let me down. Amazing.
Check them out here https://m.do.co/c/f1c6edf8597f and get $100(!!!) free credits towards the cost of servers.

#techEntrepreneur #rubyOnRails #softwareDevelopment

,

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.