reference = Class.new(ActiveRecord::Base) {

+    reference = Class.new(base) {  

if  u add ur ref will adding in the app.