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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:41:39+00:00 2026-05-18T08:41:39+00:00

This is my users_controller.rb code: … def edit @user = @current_user end def update

  • 0

This is my users_controller.rb code:

  ...
  def edit
    @user = @current_user
  end

  def update
    @user = @current_user # makes our views "cleaner" and more consistent
    if @user.update_attributes(params[:user])
      flash[:notice] = "Account settings updated."
      redirect_back_or_default account_url
    else
      render :action => 'edit'
    end
  end
  ...

I have the following views/users:

  1. new.html.erb
  2. password.html.erb
  3. profile.html.erb
  4. show.html.erb

Everytime I try to update my user account settings, the following pops up:

ActionView::MissingTemplate (Missing template users/edit.erb in view path app/views:vendor/plugins/admin_data/app/views):
  app/controllers/users_controller.rb:46:in `update'

It’s not the fault of admin_data is you are curious. It’s the controller. What have I done wrong? Thanks.

  • 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-18T08:41:40+00:00Added an answer on May 18, 2026 at 8:41 am

    First, if you want the update action to return to :show, you should change

    render :action => 'edit'
    

    to

    render :action => 'show'
    

    otherwise, it will of course look for edit.html.erb or edit.erb

    Second, if you use ‘show’ for letting the user edit his/her information, why do you actually have the :edit action in your controller? If you don’t use it, you should probably remove the following:

    def edit
      @user = @current_user
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a usercenter/users_controller,in this controller have code like belows def login end def
consider this code class User < ActiveRecord::Base has_many :views has_many :posts, :through => :views,
This is the code I have at the end a the create method in
I made these changes appropriately: Now in 'app/controllers/ users_controller.rb ' I have this code:
Im having problems understanding the app logic to this password reset code i found
This is my controller code: using (var db = new MatchGamingEntities()) { var MyMatches
I've created a file in the tmp directory with the following controller code: def
So I have a database schema like this: Users UserId RoleUserXRef RoleUserId RoleId UserId
My table structure looks like this: tbl.users tbl.issues +--------+-----------+ +---------+------------+-----------+ | userid | real_name
I have a DataGridView binded to this table: [Users] ID Name -- ---- 11

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.