Module: BeerDbAdmin::ApplicationHelper
- Defined in:
- app/helpers/beer_db_admin/application_helper.rb
Instance Method Summary collapse
-
#breadcrumb(*parts) ⇒ Object
todo/fix: try/polish breadcrumb helper.
- #image_tag_for_country(country, opts = {}) ⇒ Object
- #powered_by ⇒ Object
Instance Method Details
#breadcrumb(*parts) ⇒ Object
todo/fix: try/polish breadcrumb helper
7 8 9 10 11 |
# File 'app/helpers/beer_db_admin/application_helper.rb', line 7 def (*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_by ⇒ Object
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 content_tag :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' ) + ' - ' + content_tag( :span, "Ruby/#{RUBY_VERSION} (#{RUBY_RELEASE_DATE}/#{RUBY_PLATFORM}) on") + ' ' + content_tag( :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 |