| name | explain-diff-html |
|---|---|
| description | Use when the user asks for a rich explanation of a code change, diff, branch, or PR. Produces HTML output. |
Please make me a rich, interactive explanation of the specified code change.
It should have these sections:
| # app/controllers/application_controller.rb | |
| class ApplicationController < ActionController::Base | |
| include Devise::Redirects | |
| # Prevent CSRF attacks by raising an exception. | |
| # For APIs, you may want to use :null_session instead. | |
| protect_from_forgery with: :exception | |
| include Locale | |
| end |
| # config/application.rb | |
| module YourApp | |
| class Application < Rails::Application | |
| # ... | |
| # Auto load lib folder | |
| config.autoload_paths << Rails.root.join('lib') | |
| end | |
| end |
| RSpec::Matchers.define :inherit_from do |superclass| | |
| match do |klass| | |
| klass.class.ancestors.include? superclass | |
| end | |
| failure_message_for_should do |klass| | |
| "expected #{klass.class.name} to inherit from #{superclass}" | |
| end | |
| failure_message_for_should_not do |klass| |