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

multiple models #1

Open
wakiki opened this issue Dec 7, 2009 · 2 comments
Open

multiple models #1

wakiki opened this issue Dec 7, 2009 · 2 comments

Comments

@wakiki
Copy link

wakiki commented Dec 7, 2009

Does this support making an aggregate score based on multiple models?

eg. a person may have many addresses, pictures, jobs etc. each of which is a separate AR model

perhaps it could be checked using the symbols which links to another method?

@wakiki
Copy link
Author

wakiki commented Dec 7, 2009

I've managed to implement this with:

check :groups, lambda {|p| !p.groups.empty? }

but may I suggest that empty arrays should be interpreted as a fail by default? This will then allow:

check :groups, :groups

which is much nicer

better still, it would be better to have syntax such as

check :has_groups, :has_blah_associations

@upender-d
Copy link

in my profile model i have has_many :technologies ,so how can i implement this to technologies?

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

2 participants