I have three models such as Community, Tagging, and Tag
Community
belongs_to :tagTagging
has_one :community<= taggable_id will be Community's idTagging
belongs_to :tagTag
has_many :taggings# Tag has 'name' attribute
In this situation, if I had params[:tag], how can I write SQL code to fetch all the communities with tagged by params[:tag]?