Module: BeerDbAdmin::ApplicationHelper

Defined in:
app/helpers/beer_db_admin/application_helper.rb

Instance Method Summary collapse

Instance Method Details

todo/fix: try/polish breadcrumb helper



7
8
9
10
11
# File 'app/helpers/beer_db_admin/application_helper.rb', line 7

def breadcrumb(*parts)
  content_for :breadcrumb do
    parts.join( '' )
  end
end

#image_tag_for_country(country, opts = {}) ⇒ Object



27
28
29
30
31
32
33
# File 'app/helpers/beer_db_admin/application_helper.rb', line 27

def image_tag_for_country( country, opts={} )
  if opts[:size] == 'large' || opts[:size] == '64x64'
    image_tag "flags/64x64/#{country.key}.png"
  else
    image_tag "flags/24x24/#{country.key}.png"
  end
end

#powered_byObject



13
14
15
16
17
18
19
20
21
22
23
24
# File 'app/helpers/beer_db_admin/application_helper.rb', line 13

def powered_by
   :div do
    link_to( 'Questions? Comments?', 'http://groups.google.com/group/beerdb' ) + " | " +
    link_to( "world.db/#{WorldDb::VERSION}", 'https://github.com/worlddb/world.db.ruby' )  + ', ' +
    link_to( "beer.db/#{BeerDb::VERSION}", 'https://github.com/beerkit/beer.db.ruby' ) + ', ' +
    link_to( "beer.db.admin/#{BeerDbAdmin::VERSION}", 'https://github.com/beerkit/beer.db.admin' ) + ' - ' +
    ( :span, "Ruby/#{RUBY_VERSION} (#{RUBY_RELEASE_DATE}/#{RUBY_PLATFORM}) on") + ' ' +
    ( :span, "Rails/#{Rails.version} (#{Rails.env})" ) + " | " + 
    link_to( 'Icon Drawer Flags', 'http://www.icondrawer.com' )
    ## content_tag( :span, "#{request.headers['SERVER_SOFTWARE'] || request.headers['SERVER']}" )
  end
end