Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7028013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:19:47+00:00 2026-05-28T00:19:47+00:00

in my application.html, i have this inside: … <script src=http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js></script> … in my _post.html,

  • 0

in my application.html, i have this inside:

 ...
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
 ...

in my _post.html, i have the follow block to allow users to delete posts:

<% if current_user == post.user or can? :manage, :all %>
     <span class ="plaintext"> [<%= link_to_if(can?(:delete, post), 'Delete', post_path(post), :class=>'delbuttons', :id=>'delete', :confirm => "Are you sure?", :method => :delete) {} %>]
     </span>
    <% end %>

for some reason, though, having the line prevents my posts from being deleted! it’s very weird. how do i enable deletion again? i’m on Rails 3.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:19:48+00:00Added an answer on May 28, 2026 at 12:19 am

    As most browsers don’t natively support the delete HTTP verb, rails uses javascript to be able to perform a delete action. To have this working with jquery you’ll need to include a version of rails.js that works with jQuery (and the version of jQuery you are using).

    You can get the latest copy of jQuery here: http://code.jquery.com/jquery-1.7.1.min.js
    And grab the latest rails.js here: https://raw.github.com/rails/jquery-ujs/master/src/rails.js

    Update your application layout to include both like so:

    <%= javascript_include_tag 'jquery-1.7.1.min.js' %>
    <%= javascript_include_tag 'rails.js' %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WinForms application, running on .net 3.5. This Application generates HTML on
We have some html that looks like this: <form id=MyUserControl runat=server method=post> <script language=javascript
I'm sorry if this is confusing but in my layouts/application.html.erb I have several links,
I have a partial page in my application named _dashboard.html.erb. Inside of the dashboard,
I have a HTML application, partially HTML, partially VBscript, disguised as a form. What
I have an application where an HTML page first loads, then an applet with
I have an HTML page (it's out of an internal address book application) and
I have a webview in my iPhone application, and I also have some html
Background: we have an application that generates reports from HTML (that may or may
I have a simple HTML (as HTA) application that shows strange behavior on Windows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.