README.md in has_meta-0.0.4 vs README.md in has_meta-0.0.5

- old
+ new

@@ -2,11 +2,12 @@ [![Gem Version](https://badge.fury.io/rb/has_meta.png)](http://badge.fury.io/rb/has_meta) Adds convenience methods to extract "meta" (as in http meta) strings from models by using existing fields or lambda/Procs for source data. Result is stripped of html -tags and truncated to length (default 255). +tags and truncated to length (default 255). If the meta is 'keywords' the result will take extra +steps to strip white space and remove blank elements (ie. multiple commas) ## Installation Add this line to your application's Gemfile: @@ -32,11 +33,11 @@ end end bp = BlogPost.new(...) - bp.meta_keywords == bp.meta_keywords + bp.meta_keywords == bp.keywords # if short_description is not blank and less than 255 characters then bp.meta_description == bp.short_description # if short_description is blank then @@ -44,9 +45,16 @@ # blocks will be passed an instance of the object itself bp.meta_foo == "Feb 27, 4:36:00 PM" # for example sleep 1 bp.meta_foo == "Feb 27, 4:36:01 PM" # one second later + + # 'keywords' gets extra special treatment. + bp.short_description = ',one two, ,three, ' + bp.meta_description == ',one two, ,three, ' + + bp.keywords = ',one two, ,three, ' + bp.meta_keywords == 'one,two,three' ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`)