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 6127337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:29:40+00:00 2026-05-23T16:29:40+00:00

i am having a problem with my rails 3 app In my view i

  • 0

i am having a problem with my rails 3 app

In my view i have

<%= button_to("Accept Post", {}, {:confirm => "Are you sure?", :method => :accept_question, :remote => true}) %>

The generated html is

<form method="post" action="/questions/show/1" data-remote="true" class="button_to">
    <div>
        <input data-confirm="Are you sure?" type="submit" value="Accept Post" />
        <input name="authenticity_token" type="hidden" value="Rv1CbqkE+61Fn4wb836eOENjyGkNpzzRrwMTywLZPf0=" />
    </div>
</form>

my gem file is loading this

gem 'jquery-rails'

The following .js files are appearing in the generated html

<script src="/javascripts/jquery.js?1309961714" type="text/javascript"></script> 
<script src="/javascripts/jquery-ui.js?1309961714" type="text/javascript"></script> 
<script src="/javascripts/jquery-ui.min.js?1305044364" type="text/javascript"></script> 
<script src="/javascripts/jquery.min.js?1309961714" type="text/javascript"></script> 
<script src="/javascripts/jquery.tools.min.js?1309338309" type="text/javascript"> </scipt>
<script src="/javascripts/rails.js?1309961714" type="text/javascript"></script> 
<script src="/javascripts/application.js?1309424326" type="text/javascript"></script> 

I have seen other posts on this topic, but nothing works, i get no error, just a redirect to the same page, without being prompted. I have other bits of code that use jquery, which work fine. the problem i have is that the confirm and method does not prompt be before continuing. What is a good way to implement jquery into an app, i have tried to include jrails, however all my other code breaks thanks for the help

  • 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-23T16:29:41+00:00Added an answer on May 23, 2026 at 4:29 pm

    I’ve seen this problem before, and I just found a workaround, using pure JavaScript. If you are in a hurry this might just do for now.

    You can try this and you get the same effect:

    <%= button_to("Accept Post", {}, {:onclick => "return confirm('Are you sure?')", :method => :accept_question, :remote => true}) %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm having problem to deal with charset in ruby on rails app, specificially in
I'm having a problem in my Ruby on Rails app with a model where
I have a rails 3 app that grabs a 'post' via ajax and inserts
I'm having a problem deploying my Rails app to Heroku, where this error is
I'm having a problem installing Spree in a Rails app. when I run gem
I'm having a very small problem with my Rails App. I'm setting up a
I am having a problem getting an old Ruby on Rails 2 app that
I've got a rails 3.1 app deployed on Heroku Cedar. I'm having a problem
We're converting our Rails 2.3 app to 3.0.11, and were having a problem migrating
I'm having a really weird problem with my rails app and facebook's open graph

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.