fix dialog, add base class for ActiveRecord