Created
July 10, 2019 10:06
-
-
Save mwlang/39a18d7af5f2c701ba114e403db33a65 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 05:51:54 web.1 | GET /redis | |
| 05:51:54 web.1 | ▸ Handled by Redis::Index | |
| 05:51:54 web.1 | ▸ Ran protect_from_forgery | |
| 05:51:54 web.1 | ▸ Ran test_backdoor | |
| 05:51:54 web.1 | ▸ Stopped by require_sign_in | |
| 05:51:54 web.1 | ▸ Sent 302 (210.0µs) | |
| 05:51:54 web.1 | GET /sign_in | |
| 05:51:54 web.1 | ▸ Handled by SignIns::New | |
| 05:51:54 web.1 | ▸ Ran protect_from_forgery | |
| 05:51:54 web.1 | ▸ Ran test_backdoor | |
| 05:51:54 web.1 | ▸ Ran redirect_signed_in_users | |
| 05:51:54 web.1 | ▸ Rendered SignIns::NewPage | |
| 05:51:54 web.1 | ▸ Sent 200 (895.0µs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Redis::IndexPage < PublicLayout | |
| needs redis_keys : Array(Redis::RedisValue) | |
| def key_name(key : Redis::RedisValue) | |
| k = key | |
| k.nil? ? "" : k.to_s | |
| end | |
| def content | |
| ul class: "redis-list" do | |
| @redis_keys.each do |name| | |
| li key_name(name), class: "redis-name" | |
| end | |
| end | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| abstract class PublicLayout | |
| include Lucky::HTMLPage | |
| abstract def content | |
| abstract def page_title | |
| # The default page title. It is passed to `Shared::LayoutHead`. | |
| # | |
| # Add a `page_title` method to pages to override it. You can also remove | |
| # This method so every page is required to have its own page title. | |
| def page_title | |
| "Welcome" | |
| end | |
| def render | |
| html_doctype | |
| html lang: "en" do | |
| mount Shared::LayoutHead.new(page_title: page_title, context: @context) | |
| body do | |
| mount Shared::FlashMessages.new(@context.flash) | |
| # render_signed_in_user | |
| content | |
| end | |
| end | |
| end | |
| private def render_signed_in_user | |
| text "Guest" | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment