Created
April 22, 2011 04:34
-
-
Save technicalpickles/936018 to your computer and use it in GitHub Desktop.
timeout proxy object brainstorming
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
@video = timeout_after 5.seconds do | |
RemoteVideo.find(params[:id]) | |
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
<% unless @video.timed_out? %> | |
<div class="video"> | |
<p><%= @video.title %></p> | |
</div> | |
<% else %> | |
<p>Video temporarily unavailable</p> | |
<% 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
<div class="video"> | |
<p><%= @video.title # => throws some sort of timeout error?! %></p> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment