README.rdoc in ads-rails-0.1.0 vs README.rdoc in ads-rails-0.1.1

- old
+ new

@@ -1,14 +1,10 @@ -=== WARNING: From version 0.0.8 and above we changed the behavior of the renderer to only being use when the environment is not production. +{<img src="https://badge.fury.io/rb/ads-rails.png" alt="Gem Version" />}[http://badge.fury.io/rb/ads-rails] {<img src="https://codeclimate.com/github/museways/ads-rails.png" />}[https://codeclimate.com/github/museways/ads-rails] {<img src="https://travis-ci.org/museways/ads-rails.png?branch=master" alt="Build Status" />}[https://travis-ci.org/museways/ads-rails] ---- - -{<img src="https://badge.fury.io/rb/ads-rails.png" alt="Gem Version" />}[http://badge.fury.io/rb/ads-rails] {<img src="https://codeclimate.com/github/museways/ads-rails.png" />}[https://codeclimate.com/github/museways/ads-rails] {<img src="https://travis-ci.org/museways/ads-rails.png?branch=master" alt="Build Status" />}[https://travis-ci.org/museways/ads-rails] {<img src="https://gemnasium.com/museways/ads-rails.png" alt="Dependency Status" />}[https://gemnasium.com/museways/ads-rails] - = Ads Rails -Adds a simple helper to create the google adsense include tag. +Adds a simple helper to create the google adsense include tag in rails. = Install Put this line in your Gemfile: gem 'ads-rails' @@ -16,14 +12,34 @@ Then bundle: $ bundle = Usage -In your view add a line like this wherever you like: - <%= google_adsense_include_tag client: 'client', slot: 'slot', width: 'width', height: 'height' %> +In your views call the helper like this: + <%= google_adsense_include_tag client: 'pub-1234', slot: '1234', ... %> -(Will only show the include tag in production) +All the arguments will be mapped to the the corresponding google_ad variable: + google_ad_client = 'pub-1234' + google_ad_slot = '1234' + . + . + . +NOTE: If environment is not production, will show a gray rectangle. + = Configuration -If you don't like the default color div in development, you can use a custom renderer: - config.ads.renderer = lamda { |options| tag(:img, src: "http://placehold.it/#{options[:width]}x#{options[:height]}&text=Google+AdSense") } +To change the output when the environment is not production, add a custom renderer in your application.rb: + config.ads.renderer = lambda { |options| + tag( + :img, + src: "http://placehold.it/#{options[:width]}x#{options[:height]}&text=Adsense" + ) + } + += Credits + +This gem is maintained and funded by museways[http://museways.com]. + += License + +It is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.