Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: /Users/jgoebel/rails/pastie/app/controllers/pastes_controller.rb
- ===================================================================
- --- /Users/jgoebel/rails/pastie/app/controllers/pastes_controller.rb (revision 1873)
- +++ /Users/jgoebel/rails/pastie/app/controllers/pastes_controller.rb (working copy)
- @@ -119,6 +119,11 @@
- + unless @params[:paste][:authorization]=="burger" or @paste.textmate_html
- + flash[:notice]="You appear to be a bot, I can't accept your paste. JS is now required to paste."
- + render :action => "edit" and return
- + end
- +
- Index: /Users/jgoebel/rails/pastie/app/views/pastes/edit.rhtml
- ===================================================================
- --- /Users/jgoebel/rails/pastie/app/views/pastes/edit.rhtml (revision 1873)
- +++ /Users/jgoebel/rails/pastie/app/views/pastes/edit.rhtml (working copy)
- @@ -30,7 +30,9 @@
- <%= javascript_tag "toggle_private();" %>
- <p>
- -<%= text_area 'paste', 'body', :class=>"pastebox", :tabindex => "20" %></p>
- +<%= text_area 'paste', 'body', :class=>"pastebox", :tabindex => "20" %>
- +<%= hidden_field_tag 'paste[authorization]', "booger", :id => "paste_authorization" %>
- +</p>
- <input type="hidden" name="key" value="<%=@paste.access_key%>">
- <%= submit_tag (@paste.body.blank? ? 'Paste' : 'Save Paste'), :id => "submit", :class => "submit", :tabindex => "30" %>
- @@ -56,3 +58,7 @@
- <%= end_form_tag %>
- <%= javascript_tag "$('paste_body').focus();" %>
- +
- +<% if @paste.new_record? %>
- +<%= javascript_tag "$('paste_authorization').value='burger';" %>
- +<% end %>
Add Comment
Please, Sign In to add comment