diff --git a/app/controllers/beers_controller.rb b/app/controllers/beers_controller.rb index bc67e3b..2095adb 100644 --- a/app/controllers/beers_controller.rb +++ b/app/controllers/beers_controller.rb @@ -9,6 +9,9 @@ class BeersController < ApplicationController @secondary_title = 'Browsing all beers' @pages, @beers = paginate :beers, :include => 'page', :per_page => per_page, :order => 'beers.title ASC' + if @beers.empty? + flash.now[:notice] = 'There are no beers yet.' + end @tags = Page.tags(:limit => 25, :order => "name DESC", :owner_type => 'Beer') respond_to do |format| diff --git a/app/controllers/breweries_controller.rb b/app/controllers/breweries_controller.rb index eb1e524..3c24d90 100644 --- a/app/controllers/breweries_controller.rb +++ b/app/controllers/breweries_controller.rb @@ -9,10 +9,11 @@ class BreweriesController < ApplicationController @secondary_title = 'Browsing all breweries' @pages, @breweries = paginate :breweries, :include => 'page', :order => 'breweries.title ASC', :per_page => per_page - + if @breweries.empty? + flash.now[:notice] = 'There are no breweries yet.' + end @tags = Page.tags(:limit => 25, :order => "name DESC", :owner_type => 'Beer') - respond_to do |format| format.html # index.rhtml format.xml { render :xml => @breweries.to_xml } diff --git a/app/views/beers/index.rhtml b/app/views/beers/index.rhtml index 01d5c8b..bc94949 100644 --- a/app/views/beers/index.rhtml +++ b/app/views/beers/index.rhtml @@ -1,9 +1,5 @@ <%= render :partial => 'shared/pagination_links' %> diff --git a/app/views/breweries/index.rhtml b/app/views/breweries/index.rhtml index 424c9e5..b52df6d 100644 --- a/app/views/breweries/index.rhtml +++ b/app/views/breweries/index.rhtml @@ -1,9 +1,5 @@ <%= render :partial => 'shared/pagination_links' %> diff --git a/app/views/peoples/index.rhtml b/app/views/peoples/index.rhtml index 4de464e..f702097 100644 --- a/app/views/peoples/index.rhtml +++ b/app/views/peoples/index.rhtml @@ -1,9 +1,5 @@ <%= render :partial => 'shared/pagination_links' %> diff --git a/app/views/roles/index.rhtml b/app/views/roles/index.rhtml index 3ba92af..c6dec99 100644 --- a/app/views/roles/index.rhtml +++ b/app/views/roles/index.rhtml @@ -1,11 +1,5 @@ <% content_for :sidebar do -%>