0.0
No release in over a year
This Rake task investigates the application's controller, then tells you missing callbacks
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.9

Runtime

>= 5.0.0
 Project Readme

tracecontroller

A Rake task that helps you find missing callbacks in your Rails app.

Install

Put this line in your Gemfile:

gem 'tracecontroller'

Then bundle:

% bundle

Usage

Create a .tracecontroller.yaml or .tracecontroller.yml file in your root directory.

- path: ^/api
  superclass: API::BaseController
  actions:
    - before:
        - require_login_for_api

- path: ^/
  actions:
    - before:
        - require_login
  ignore_classes:
    - ^ActionMailbox|^ActiveStorage|^Rails
    - ^API

Just run the following command in your Rails app directory.

% rake tracecontroller

If you want the rake task to fail when errors are found.

% FAIL_ON_ERROR=1 rake tracecontroller

Copyright

Copyright (c) 2020 Akira Kusumoto. See MIT-LICENSE file for further details.