Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readme syntax #1

Merged
merged 2 commits into from
Oct 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
```
```