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

Improved ActionView flows.rb documention [ci skip] #24508

Merged
merged 1 commit into from
Apr 11, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 4 additions & 5 deletions actionview/lib/action_view/flows.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ def initialize(view, fiber)
end

# Try to get stored content. If the content
# is not available and we are inside the layout
# fiber, we set that we are waiting for the given
# key and yield.
# is not available and we're inside the layout fiber,
# then it will begin waiting for the given key and yield.
def get(key)
return super if @content.key?(key)

Expand All @@ -60,8 +59,8 @@ def get(key)
end

# Appends the contents for the given key. This is called
# by provides and resumes back to the fiber if it is
# the key it is waiting for.
# by providing and resuming back to the fiber,
# if that's the key it's waiting for.
def append!(key, value)
super
@fiber.resume if @waiting_for == key
Expand Down