Class: Whodunit::Railtie

Inherits:
Object
  • Object
show all
Defined in:
lib/whodunit/railtie.rb

Overview

Note:

When Rails is not available, this class safely inherits from Object and does not cause any errors.

Rails integration for automatic setup of Whodunit functionality.

This Railtie automatically extends ActiveRecord migrations with MigrationHelpers and includes ControllerMethods in ActionController::Base when Rails is available. It provides seamless integration without requiring manual setup.

Examples:

Automatic integration (no setup required)

# In a Rails app, this automatically provides:
# - Migration helpers (add_whodunit_stamps, etc.)
# - Controller methods (set_whodunit_user, etc.)

Since:

  • 0.1.0