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

  • Home
  • SEARCH
  • 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 921775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:55:11+00:00 2026-05-15T18:55:11+00:00

Here’s the page template I’ve got: <h1>Editing user</h1> <% form_for(@user) do |f| %> <%=

  • 0

Here’s the page template I’ve got:

<h1>Editing user</h1>

<% form_for(@user) do |f| %>
    <%= f.error_messages %>
    <p>
        <%= f.label :forename %><br />
        <%= f.text_field :forename %>
    </p>
    <p>
        <%= f.label :surname %><br />
        <%= f.text_field :surname %>
    </p>
    <p>
        <%= f.label :address %>
        <%= f.text_field :address %>
    </p>
    <p>
        <%= f.label :postcode %>
        <%= f.text_field :postcode %>
    </p>
    <p>
        <%= f.label :contact_number %>
        <%= f.text_field :contact_number %>
    </p>
<% end %>

<%= link_to 'Show', @user %> |
<%= link_to 'Back', users_path %>

The controller is actually sub-typed from the AdminController as there’s a separate section as the following class declaration shows:

class Admin::UsersController < ApplicationController

with the edit method as follows:

def edit
    @user = User.find(params[:id])
end

With the error as follows:

undefined method `user_path' for #<ActionView::Base:0x104369fe8>

and the following in my routes:

map.namespace(:admin) do |admin|
    admin.resources :pages
    admin.resources :treatments
    admin.resources :users
    admin.resources :finances
end

So I’m a bit stuck, because it’s the form_for(@user) that’s doing it. I’ve seen this before but have no idea how to diagnose it unfortunately.

  • 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-15T18:55:12+00:00Added an answer on May 15, 2026 at 6:55 pm

    Since you are using a name spaced routes, you have to specify the name space in the form_for invocation.

    <% form_for([:admin, @user]) do |f| %>
    

    Refer to the documentation for more details.(Hint: Read the end of the Resource-oriented style section)

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

Sidebar

Related Questions

Here's my scenario: <!-- Normal Control --> <div class=required> <label for=address1>Address line 1</label> <input
Here's the problem....I have three components...A Page that contains a User Control and a
Here is a simplification of my database: Table: Property Fields: ID, Address Table: Quote
Here is what is supposed to happen: The moment the user chooses an option
Here is my code (Say we have a single button on the page that
Here's the flow that I am trying to achieve: 1) User uploads an audio
Here is my simplified data structure: Object1.h template <class T> class Object1 { private:
Here's the situation, i want to have a user that can enter time on
Here's my situation: I have a Data Template set up which contains a ToggleButton
Here is my Default.aspx <%@ Page Language=C# AutoEventWireup=true CodeFile=Default.aspx.cs Inherits=_Default ValidateRequest=false %> <html> <head

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.