Class: BeerDbAdmin::TagsController

Inherits:
BeerDbAdminController show all
Defined in:
app/controllers/beer_db_admin/tags_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



7
8
9
10
# File 'app/controllers/beer_db_admin/tags_controller.rb', line 7

def index
  @beer_tags    = Tag.uniq.joins(:taggings).where("taggings.taggable_type='BeerDb::Models::Beer'").order('key').all
  @brewery_tags = Tag.uniq.joins(:taggings).where("taggings.taggable_type='BeerDb::Models::Brewery'").order('key').all
end