Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot persist model data #8

Open
cloud-on-prem opened this issue Dec 22, 2011 · 5 comments
Open

Cannot persist model data #8

cloud-on-prem opened this issue Dec 22, 2011 · 5 comments

Comments

@cloud-on-prem
Copy link

When I try to save! an instance, it throws up this error

NoMethodError: undefined method `fail_validate!' for MyClass:Class

I looked into your code and could not find the "fail_validate!" method. Could you please help?

Cheers
-Prem

@namxam
Copy link
Owner

namxam commented Jan 30, 2012

When exactly does this happen? Could you send me the failing code?

@ayqazi
Copy link

ayqazi commented Jun 5, 2012

Hello,

I am having the same problem. All you have to do is define a validation in a model, and try to save an instance of that model while failing validation (i.e. save with a nil in a 'validates presence' field).

Thanks

@pehrlich
Copy link

pehrlich commented Aug 5, 2012

I'm getting the same error -- rails 3.2.7:

> u = User.new
(Object doesn't support #inspect)
 =>  
> u.save
 => false 
> u.save!
NoMethodError: undefined method `fail_validate!' for User:Class
    from /Users/peter/.rvm/gems/ruby-1.9.3-p194/gems/architect4r-0.4.3.1/lib/architect4r/model/persistency.rb:17:in `save!'

My user.rb is fairly simple:

class User < Architect4r::Model::Node
  property :name
end

Ideas?

@pehrlich
Copy link

pehrlich commented Aug 5, 2012

So the only mention of fail_validate! which I can find on the web is here:

https://github.com/mongoid/mongoid/blob/master/lib/mongoid/persistence.rb#L308

Why would Architect4r be expecting a mongoid method?

@joeyjoejoejr
Copy link

pehrlich, you need to have your neo4j server running and set properly in an architecht4r.yml

The only way I was able to reproduce your error was when I shut my Neo4j server down. That error might should probably be caught, it is a bit confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants