# How to merge multiple 'having' clause relation in rails 3

**URL:** <https://www.ruby-forum.com/t/how-to-merge-multiple-having-clause-relation-in-rails-3/210524>\
**Category:** Rails\
**Created:** [August 10, 2011, 8:11am UTC](https://www.ruby-forum.com/t/how-to-merge-multiple-having-clause-relation-in-rails-3/210524 "2011-08-10T08:11:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [August 10, 2011, 8:11am UTC](https://www.ruby-forum.com/t/how-to-merge-multiple-having-clause-relation-in-rails-3/210524/1 "2011-08-10T08:11:57Z")

</div>

If i remove any one of scopes having clause then the above action  
works perfectly . Is there any way to like- @model =  
Model.vacant\_list(daterange) and then remove the active record  
relation and then apply @model.amenity\_type(term). I tried lots of  
things but didnt find any solution for this…  
Full question listed here

> <https://stackoverflow.com/questions/6986561/how-to-merge-multiple-having-clause-relation-in-rails-3>
