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