This repository has been archived by the owner on Apr 14, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
logout link and prevent people from entering in inline ruby code
- Loading branch information
1 parent
07fd545
commit bae3174
Showing
5 changed files
with
42 additions
and
6 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<% form_tag do %> | ||
|
||
<b><%= @helper_name %>(</b> | ||
<blockquote> | ||
<%= text_field_tag :link_text, (params[:link_text] || 'Logout'), :title => "Clickable text for logout link" %>, | ||
<br /> | ||
<%= text_field_tag :redirect_url, (params[:redirect_url] || request.url), :size => 70, :title => "URL to redirect to upon logout" %> | ||
<br /> | ||
</blockquote> | ||
<b>)</b> | ||
|
||
<%= submit_tag 'Go' %> | ||
<% end %> | ||
<% 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> | ||
<% end %> |
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
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
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