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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:54:09+00:00 2026-05-25T22:54:09+00:00

I am using rails 2.3.8 and I’ll load a modal dialog box using a

  • 0

I am using rails 2.3.8 and I’ll load a modal dialog box using a partial called _show_venue.html.erb. Inside this partial I add link_to_remote to edit each venue.

_show_venue.html.erb ::

<table>
<tr>
<th>Country</th>
<th>Place</th>
<th>Color</th>
</tr>

<% @venues.each do |venue| %>
<tr>
<td><%=h venue.country_id %></td>
<td><%=h venue.place %></td>
<td><%=h venue.color %></td>

<td><%= link_to_remote 'Edit', :url => {:controller => 'venues', :action => 'edit', :id=>venue.id } %></td>
</tr>
<% end %>
</table>

And this is my controller code ::

def edit
@venue = Venue.find(params[:id])
end

edit.js.rjs ::

page.replace_html 'edit_venue', :partial => 'edit_form'
page<< "$j ('#event_actions').dialog({
    title: 'Edit venue
    modal: true,
    width: 500,
    close: function(event, ui) { $j ('#event_actions').dialog('destroy') }
});"

But when I run this, it could not find edit.js.rjs file. Why did this happen? Anyone can explain it?

  • 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-25T22:54:10+00:00Added an answer on May 25, 2026 at 10:54 pm

    You should do the following changes to you controller method:

    respond_to do |format|    
          format.js      
    end
    

    so that it will find the edit.js.rjs and render it.

    Edit: The 404 HTTP status which was the main problem was because of a missing route.

    A route to match venues/:id/edit should solve the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using rails beta 3 and I have a erb page named index.html.erb
Using Rails 3.2.0.rc2 and ruby 1.9.3p0 In app/views/requests/_form.html.erb I have the following code for
Im using Rails 3.0.3 and ruby 1.8.7 I want to render /materials/change_prize.html.erb in materials/change_prize.js.erb
Using Rails 3.2.1 I created a simple controller called Home using the command: rails
Using Rails 2.3.11 , I'm creating a plugin for Redmine that add methods to
Using Rails, I would like to add: <span class='req'>&bull;</span> within my <label> tags in
I am using Rails 2.2.2 and I would like to add an id to
I am using Rails 3.0.7 and I am trying to follow this Railscast: http://railscasts.com/episodes/182-cropping-images
Using Rails 2.3.8. I have added this in my controller: filter_parameter_logging :password, :password_confirmation But
Using: Rails 3.1.1 I have a controller/model/view called Category that is built up on

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.