Last active
August 4, 2017 11:23
-
-
Save c910335/d961fc5c6bfa2a2f3bb0a51ca8ce6ff8 to your computer and use it in GitHub Desktop.
Amber before action issue
This file contains 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
I, [2017-08-04 18:49:23 +0800 #4972] INFO -- : [Amber 0.1.6] serving application "Test web application." at http://0.0.0.0:3000 | |
I, [2017-08-04 18:49:23 +0800 #4972] INFO -- : Server started in development. | |
I, [2017-08-04 18:49:23 +0800 #4972] INFO -- : Startup Time 00:00:00.0002180 | |
1 | |
2 | |
3 | |
4 | |
200 | GET "/test" | 188.0µs | |
Params: |
This file contains 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 TestController < ApplicationController | |
before_action do | |
all do | |
puts count | |
end | |
end | |
def count | |
@count ||= 0 | |
@count = @count.not_nil! + 1 | |
end | |
def index | |
"" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment