class ApplicationController
def self.inherited(child_class)
const_set("TAG", child_class.name)
end
end
class UsersController < ApplicationController
def check_const
puts TAG
end
end
UsersController.new.check_const # => UsersController