spec/fake_app/user.rb in validates_cpf-1.1.3 vs spec/fake_app/user.rb in validates_cpf-2.0.0.rc1

- old
+ new

@@ -1,3 +1,15 @@ -class User < ActiveRecord::Base +class User + include ActiveModel::Validations + include ActiveModel::Conversion + extend ActiveModel::Naming + + attr_accessor :cpf, :name + validates :cpf, :cpf => true + + def initialize(attributes = {}) + attributes.each do |key, value| + instance_variable_set("@#{key}", value) + end + end end \ No newline at end of file