completeness-fu icon indicating copy to clipboard operation
completeness-fu copied to clipboard

multiple models

Open wakiki opened this issue 15 years ago • 2 comments

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 avatar Dec 07 '09 10:12 wakiki

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

wakiki avatar Dec 07 '09 11:12 wakiki

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

upender-d avatar Nov 30 '11 13:11 upender-d