Skip to content
This repository has been archived by the owner on Apr 14, 2018. It is now read-only.

Commit

Permalink
break some common views into a partial
Browse files Browse the repository at this point in the history
  • Loading branch information
phallstrom committed Apr 10, 2009
1 parent 0a2014e commit edbe788
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 50 deletions.
11 changes: 1 addition & 10 deletions app/views/helper/_fb_login_and_redirect.html.erb
Expand Up @@ -37,14 +37,5 @@
<% if request.post? %>
<% invocation = helper_invocation("#{@helper_name}(request.url", params) %>

<h3>Invocation</h3>
<div class='boxed'>
<%= h invocation %>
</div>

<h3>Result</h3>
<div class='boxed'>
<%= render :inline => invocation %>
</div>
<%= render :partial => 'invocation_and_result' %>
<% end %>
11 changes: 1 addition & 10 deletions app/views/helper/_fb_login_button.html.erb
Expand Up @@ -46,14 +46,5 @@
<% if request.post? %>
<% invocation = helper_invocation("#{@helper_name}(\"javascript_called_onlogin()\"", params) %>

<h3>Invocation</h3>
<div class='boxed'>
<%= h invocation %>
</div>

<h3>Result</h3>
<div class='boxed'>
<%= render :inline => invocation %>
</div>
<%= render :partial => 'invocation_and_result' %>
<% end %>
11 changes: 1 addition & 10 deletions app/views/helper/_fb_logout_link.html.erb
Expand Up @@ -16,14 +16,5 @@
<% if request.post? %>
<% invocation = helper_invocation("#{@helper_name}(\"#{params[:link_text]}\", \"#{h params[:redirect_url]}\"", {}) %>

<h3>Invocation</h3>
<div class='boxed'>
<%= h invocation %>
</div>

<h3>Result</h3>
<div class='boxed'>
<%= render :inline => invocation %>
</div>
<%= render :partial => 'invocation_and_result' %>
<% end %>
11 changes: 1 addition & 10 deletions app/views/helper/_fb_name.html.erb
Expand Up @@ -65,14 +65,5 @@
<% if request.post? %>
<% invocation = helper_invocation("#{@helper_name}(#{Integer(params[:uid]) rescue '@current_user'}", params) %>

<h3>Invocation</h3>
<div class='boxed'>
<%= h invocation %>
</div>

<h3>Result</h3>
<div class='boxed'>
<%= render :inline => invocation %>
</div>
<%= render :partial => 'invocation_and_result' %>
<% end %>
11 changes: 1 addition & 10 deletions app/views/helper/_fb_profile_pic.html.erb
Expand Up @@ -40,14 +40,5 @@
<% if request.post? %>
<% invocation = helper_invocation("#{@helper_name}(#{Integer(params[:uid]) rescue '@current_user'}", params) %>

<h3>Invocation</h3>
<div class='boxed'>
<%= h invocation %>
</div>

<h3>Result</h3>
<div class='boxed'>
<%= render :inline => invocation %>
</div>
<%= render :partial => 'invocation_and_result' %>
<% end %>
9 changes: 9 additions & 0 deletions app/views/helper/_invocation_and_result.html.erb
@@ -0,0 +1,9 @@
<h3>Invocation</h3>
<div class='boxed'>
<%= h invocation %>
</div>

<h3>Result</h3>
<div class='boxed'>
<%= render :inline => invocation %>
</div>

0 comments on commit edbe788

Please sign in to comment.