Adding Ahoy gem for first-party Analytics

Asking ChatGPT-4 about ahoy gem testing

The Ahoy gem provides a solid foundation to track visits and events in Ruby, JavaScript, and native apps. Here’s how to add it to a Rails 7 application: This will generate an initializer file at config/initializers/ahoy.rb and a migration file in db/migrate/ which creates two tables, ahoy_visits and ahoy_events. Then you can use the ahoy.track … Read more

Add Confirmable to Devise

Add confirmable to Devise directions screenshot

This guide provides a comprehensive overview of the :confirmable module in Devise for Ruby on Rails applications, emphasizing its role in enhancing security by verifying the ownership of the email address registered by a user. The Devise :confirmable module prevents the creation of spam accounts, bolsters the security of user data, and ensures that an … Read more

http Basic authentication for Ruby on Rails

Screenshot asking ChatGPT to show me how to password protect one page in a ruby on rails 7 app

This is an example of http basic authentication on a Rails 7 app and an example of using ChatGPT-4 in a normal workflow. In the past I would have used Google to search this up. Now I go straight for ChatGPT. This was the prompt for Open AI aka ChatGPT-4Can you show me how to … Read more

Simple User Authentication for Ruby on Rails 7

ChatGPT-4 Screenshot question about Rails 7 user authentication

A quick question I asked ChatGPT-4:Can you show me an example of user authentication for a Ruby on Rails 7 application? Here was the response I got: Sure, in this example I’ll show how to implement a basic user authentication in a Ruby on Rails 7 application using a simplified version of the “has_secure_password” mechanism, … Read more

Status Plan by work.shopMG

Status Plan Ruby on Rails project

Status Plan is a Ruby on Rails application that I built for work.shopMG, a Chicago based Property Development Management company. It’s basically a CRM for Property Development that helps the developers communicate with the tenants and the contractors to work out their deals and complete their projects. I built this from the ground up. Initial … Read more

Project has_many Users through

Ruby on Rails code has_many users through

Ruby on Rails tutorial Here is a Ruby on Rails example of adding a join table so that you can create a has_many Users through situation with Projects. This assumes that you already have a Project and a User model. 1. Generate your scaffold: Generating a scaffold here called UserProjects. It has two reference fields … Read more

Add Index to join table with unique checks

migration to add index for join table

Ruby on Rails add index to join table, generate migration 1. make uniqueness index on areas_deals:*This stops the association from being able to be duplicated, but throws an error causing bad UI, we will address that below** 2. Check the schema and make sure you got what you want. We wanted this added: t.index [“area_id”, … Read more

Status Plan by work.shopMG

Status Plan Logo

By far the most complex piece of software that I have built, Status Plan by work.shopMG is a Ruby on Rails application used in the property development industry. The majority of my last 5 years has been spent servicing a great company work.shopMG. We handle a handful of services for the property development industry including … Read more

Carrierwave Image Upload Validation Error Message Issue

ruby code carrierwave validation

So I have two models: (area.rb and areaimage.rb) Issue resolved here => area.rb – The Area model has_many :areaimages. The areaimage uploader must exist on area#edit areaimage.rb – AreaImage model – belongs_to :area – I need to be able to upload this on area#edit, and if it fails validation, I need it to display the … Read more

My Skill Set

231 Web Dev Deadpool logo

231 Web Dev Skill Set Let’s throw something down here. A line in the sand if you will. I am going to lay out what I consider my Skill Set to be… WordPress Development – Expert Level. Custom Plugins and Themes. Password protected user based corporate websites. HTML5 – Expert Level. Recently mastering the HTML5 … Read more