refatoracao do ActiveRecord