Skip to content

Instantly share code, notes, and snippets.

@qickstarter
Created July 5, 2013 16:16
Show Gist options
  • Select an option

  • Save qickstarter/5935612 to your computer and use it in GitHub Desktop.

Select an option

Save qickstarter/5935612 to your computer and use it in GitHub Desktop.
<%=
target_url = {:controller => :spam_reports, :action => :report_comment, :url => @journal.canonical_url, :comment_body => reply.body[0..300], :spammer_id=> reply.user.id, :reporter_id => current_uid}
confirm_message = 'Are you sure you want to report this comment as spam?'
loding_jq = "$j('#reply_loader_#{reply.id}').show();"
success_jq = "$j('#reply_loader_#{reply.id}').hide();$j('#alert-box').alerter('alertSuccess', '', 'Report sent.' );"
link_to_remote('Report spam', :url => target_url, :confirm => confirm_message, :loading => loding_jq, :success => success_jq)
-%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment