From 4315bf16fc5bb56974225a97e1a99dc60609bd6a Mon Sep 17 00:00:00 2001 From: marshallmick007 Date: Fri, 4 Oct 2019 11:14:32 -0600 Subject: [PATCH 1/2] Adds ruby syntax highlighting --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5a7dcbb..c9c7bd4 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 @@ -22,4 +22,4 @@ class ProductController < ActionController::Base product = get_product stretch(params[short_product_uuid]) end end -``` \ No newline at end of file +``` From 08662bc10e9e0f3c145b81c2347c11d8584c5726 Mon Sep 17 00:00:00 2001 From: marshallmick007 Date: Fri, 4 Oct 2019 11:15:53 -0600 Subject: [PATCH 2/2] Fixes redirect_to to include string interpolation --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c9c7bd4..5dd0433 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ class ProductController < ActionController::Base #Backend uuid = create_product - redirect_to "/product/compress(uuid)" + redirect_to "/product/#{compress(uuid)}" end def index