Guest User

Untitled

a guest
May 16th, 2018
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.45 KB | None | 0 0
  1. >> u.valid?
  2. ~
  3. ~
  4. NoMethodError: undefined method `password_required?' for User:Class
  5. from /usr/local/lib/ruby/gems/1.8/gems/dm-core-0.9.0/lib/data_mapper/resource.rb:311:in `method_missing'
  6. from /Users/jdempsey/mapps/recollectr/app/models/user.rb:35
  7. from /usr/local/lib/ruby/gems/1.8/gems/dm-validations-0.9.0/lib/dm-validations/generic_validator.rb:76:in `call'
  8. from /usr/local/lib/ruby/gems/1.8/gems/dm-validations-0.9.0/lib/dm-validations/generic_validator.rb:76:in `execute?'
  9. from /usr/local/lib/ruby/gems/1.8/gems/dm-validations-0.9.0/lib/dm-validations/contextual_validators.rb:49:in `execute'
  10. from /usr/local/lib/ruby/gems/1.8/gems/dm-validations-0.9.0/lib/dm-validations/contextual_validators.rb:48:in `each'
  11. from /usr/local/lib/ruby/gems/1.8/gems/dm-validations-0.9.0/lib/dm-validations/contextual_validators.rb:48:in `execute'
  12. from /usr/local/lib/ruby/gems/1.8/gems/dm-validations-0.9.0/lib/dm-validations.rb:67:in `valid?'
  13. from (irb):3
  14. >> u.methods.sort
  15. => ["==", "===", "=~", "JSON", "[]", "[]=", "__DIR__", "__app_file_trace__", "__caller_info__", "__caller_lines__", "__clone__", "__id__", "__profile__", "__send__", "activate", "activated?", "active?", "all_valid?", "all_valid_for_default?", "assigns", "attribute_dirty?", "attribute_loaded?", "attributes", "attributes=", "authenticated?", "b64encode", "blank?", "child_associations", "class", "clone", "created_at", "created_at=", "crypted_password", "crypted_password=", "debugger", "decode64", "decode_b", "dependencies", "dependency", "destroy", "dirty?", "dirty_attributes", "display", "dup", "email", "email=", "encode64", "encrypt", "encrypt_password", "enforce!", "enum_for", "eql?", "equal?", "errors", "extend", "extract_options_from_args!", "forget_me", "freeze", "frozen?", "full_const_get", "gem", "hash", "id", "id=", "inspect", "instance_eval", "instance_of?", "instance_variable_defined?", "instance_variable_get", "instance_variable_set", "instance_variables", "is_a?", "jj", "key", "kind_of?", "load_dependencies", "load_dependency", "loaded_set", "loaded_set=", "login", "login=", "m", "make_activation_code", "make_module", "merb", "meta_class", "method", "methods", "new_record?", "nil?", "object_id", "parent_associations", "password", "password=", "password_confirmation", "password_confirmation=", "password_required?", "po", "poc", "pretty_inspect", "pretty_print", "pretty_print_cycle", "pretty_print_inspect", "pretty_print_instance_variables", "private_methods", "protected_methods", "public_methods", "quacks_like?", "readonly!", "readonly?", "recently_activated?", "recursive_const_get", "recursive_valid?", "reload!", "remember_me", "remember_me_for", "remember_me_until", "remember_token", "remember_token=", "remember_token?", "remember_token_expires_at", "remember_token_expires_at=", "repository", "require", "rescue_require", "respond_to?", "ri", "salt", "salt=", "save", "save_links", "send", "send_signup_notification", "shadow_attribute_get", "singleton_methods", "taguri", "taguri=", "taint", "tainted?", "tap", "tapp", "to_a", "to_enum", "to_json", "to_param", "to_s", "to_yaml", "to_yaml_properties", "to_yaml_style", "type", "untaint", "updated_at", "updated_at=", "urls", "use_orm", "use_test", "valid?", "valid_for_default?", "validatable?", "validation_association_keys", "validation_property_value", "what?"]
  16. >> u.methods.sort.grep "password_required?"
  17. => ["password_required?"]
  18. >> u.send(:password_required?)
  19. => true
  20. >>
Add Comment
Please, Sign In to add comment