jeudi 30 octobre 2014

nested model search under sunspot


Vote count:

0




How to search if many models has_one comment for its model,


the comment has 3 attributes needs to be searched.



text :model_name do
camera_info_comment.model_name
end
text :version do
camera_info_comment.version
end
text :mac_address do
camera_info_comment.mac_address
end


Now I have to put the above code in every model which has association with camera_info_comment


How to make my code more DRY (not to repeat many times)



asked 26 secs ago

poc

1,188






nested model search under sunspot

Aucun commentaire:

Enregistrer un commentaire