Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >> u.valid?
- ~
- ~
- NoMethodError: undefined method `password_required?' for User:Class
- from /usr/local/lib/ruby/gems/1.8/gems/dm-core-0.9.0/lib/data_mapper/resource.rb:311:in `method_missing'
- from /Users/jdempsey/mapps/recollectr/app/models/user.rb:35
- from /usr/local/lib/ruby/gems/1.8/gems/dm-validations-0.9.0/lib/dm-validations/generic_validator.rb:76:in `call'
- from /usr/local/lib/ruby/gems/1.8/gems/dm-validations-0.9.0/lib/dm-validations/generic_validator.rb:76:in `execute?'
- from /usr/local/lib/ruby/gems/1.8/gems/dm-validations-0.9.0/lib/dm-validations/contextual_validators.rb:49:in `execute'
- from /usr/local/lib/ruby/gems/1.8/gems/dm-validations-0.9.0/lib/dm-validations/contextual_validators.rb:48:in `each'
- from /usr/local/lib/ruby/gems/1.8/gems/dm-validations-0.9.0/lib/dm-validations/contextual_validators.rb:48:in `execute'
- from /usr/local/lib/ruby/gems/1.8/gems/dm-validations-0.9.0/lib/dm-validations.rb:67:in `valid?'
- from (irb):3
- >> u.methods.sort
- => ["==", "===", "=~", "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?"]
- >> u.methods.sort.grep "password_required?"
- => ["password_required?"]
- >> u.send(:password_required?)
- => true
- >>
Add Comment
Please, Sign In to add comment