Useful tools to help construct database queries with ActiveRecord and Arel.
Used 1 time
E
Eric Berry
Usage
Run this command in your Rails app directory in the terminal:
rails app:template LOCATION="https://railsbytes.com/script/Vqqs0P"
Template Source
Review the code before running this template on your machine.
gem 'arel-helpers'
inject_into_file('app/models/application_record.rb',
after: "class ApplicationRecord < ActiveRecord::Base\n") do
" include ArelHelpers::ArelTable\n"
end