diff --git a/README.md b/README.md index 5a7dcbb..5dd0433 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ shorten a uuid to a shorter representation and back I include it in rails controllers to convert uuids to short ones for UI representation and stretch them to standard uuid for use in the backend. -``` +```ruby class ProductController < ActionController::Base include UuidShortner::GuidDecoder include UuidShortner::GuidEncoder @@ -15,11 +15,11 @@ class ProductController < ActionController::Base #Backend uuid = create_product - redirect_to "/product/compress(uuid)" + redirect_to "/product/#{compress(uuid)}" end def index product = get_product stretch(params[short_product_uuid]) end end -``` \ No newline at end of file +```