Skip to content

Commit

Permalink
Merge pull request #1 from marshallmick007/update-readme-syntax
Browse files Browse the repository at this point in the history
Update readme syntax
  • Loading branch information
hallgren authored Oct 5, 2019
2 parents d1e98df + 08662bc commit 21b30e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
```
```

0 comments on commit 21b30e6

Please sign in to comment.