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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:49:08+00:00 2026-05-13T18:49:08+00:00

So here is my form <% remote_form_for([:admin, Page.new]) do |f| %> <ol> <li> <%=

  • 0

So here is my form

<% remote_form_for([:admin, Page.new]) do |f| %>
    <ol>
        <li>
            <%= f.label(:title) %>
            <%= f.text_field(:title) %>
        </li> 
        <li> 
            <%= f.label(:parent_page) %>
            <%= f.select(:parent_page_id, Page.roots.map { |p| [p.title, p.id] }.unshift(["none", nil])) %>
        </li>
    </ol>
    <div class="modal-controls">
        <%= submit_tag("Save") %> or <%= link_to_function("cancel", "R.Pages.hideAdd();") %>
    </div>
<% end %>

And my action

def create
  @page = Page.create(params[:page])
  @languages = Language.all
  @languages.each do |language|
  @page.page_languages.create(:language_id => language.id)
end

For some reason the submitted for does not call the create.js.rjs template, but instead tries to call create.html.erb, do i need some sort of extra setting with the form?

btw i am using rails 2.3.5

  • 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-13T18:49:08+00:00Added an answer on May 13, 2026 at 6:49 pm

    I can’t remember the exact default behavior in rails, but have you tried putting a respond_to at the end of your controller action:

    respond_to(:html, :js)
    

    Hope this helps.

    EDIT

    I went back to check on the default behavior for Rails in respect to rendering views. Rails favors convention over configuration in this instance. The default behavior is that Rails automatically renders views with names that correspond to actions. You don’t need the respond_to any more if you stick to this convention. Here is the documentation.

    Just wanted to update my post with the correct info… glad you figured your problem out.

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

Sidebar

Related Questions

Here's a problem I ran into recently. I have attributes strings of the form
Here is my code, which takes two version identifiers in the form 1, 5,
I need to accept form data to a WCF-based service. Here's the interface: [OperationContract]
.NET newbie here... I'd like to make a button in a Windows form that
I have this form in my view: <!-- Bug (extra 'i') right here-----------v -->
Any ideas why this won't validate here: http://validator.w3.org/#validate_by_input It seems the form input tags
I need to pause for maybe 500 miliseconds before I submit a form. Here
In my JSF/Facelets app, here's a simplified version of part of my form: <h:form
Here's a basic regex technique that I've never managed to remember. Let's say I'm
Here is the issue I am having: I have a large query that needs

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.