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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:42:10+00:00 2026-05-13T21:42:10+00:00

When I copied _form.haml partial to _edit_form.haml partial and replaced _form, with _edit_form in

  • 0

When I copied _form.haml partial to _edit_form.haml partial and replaced “_form”, with “_edit_form” in my edit.haml I got strange error (maybe it is not strange, I just cant understand the reason).

wrong number of arguments (0 for 1)

Extracted source (around line #1):

1: = form.label :email
2: %br
3: = form.text_field :email
4: %br

.../app/views/users/_edit_form.haml:1:in `form'
.../app/views/users/_edit_form.haml:1:in `_run_haml_app47views47users47_edit_form46haml_locals_edit_form_object'
.../app/views/users/edit.haml:5:in `_run_haml_app47views47users47edit46haml'
.../app/views/users/edit.haml:3:in `_run_haml_app47views47users47edit46haml'

Here is edit.haml:

%h1 Edit My Account

- form_for @user, :url => account_path do |f|
  = f.error_messages
  = render :partial => "edit_form", :object => f
  = f.submit "Update"

%br
= link_to "My Profile", account_path

…and edit_form.haml

= form.label :email
%br
= form.text_field :email
%br
%br
= form.label :old_password, "Old password"
%br
= form.password_field :old_password
%br
%br
= form.label :password, "Change password"
%br
= form.password_field :password
%br
%br
= form.label :password_confirmation
%br
= form.password_field :password_confirmation
%br

I can’t understand where is the problem. Because it worked nicely with _form.haml

diff _form.haml _edit_form.haml   
1c1
< = form.label :login
---
> = form.label :email
3c3
< = form.text_field :login
---
> = form.text_field :email
6c6
< = form.label :email
---
> = form.label :old_password, "Old password"
8c8
< = form.text_field :email
---
> = form.password_field :old_password
11c11
< = form.label :password, form.object.new_record? ? nil : "Change password"
---
> = form.label :password, "Change password"
  • 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-13T21:42:10+00:00Added an answer on May 13, 2026 at 9:42 pm

    The :object is implicitly exposed in the partial as the name of the partial. Change form to edit_form in _edit_form.haml and it should work.

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

Sidebar

Related Questions

Copied from my log file ActionView::Template::Error (Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs
I'm trying to get my buffer copied into another buffer but I cant get
I'm using MVC. I copied the login form from the login page and inserted
Copied: bin runtimes airApp-app.xml airApp.swf Calling: G:\adl\bin\adl.exe -nodebug G:\adl\airApp-app.xml Nothing on the screen, nothing
copied a UITable to a other Storyboard, now I cannot see any rows ?
I copied the raw MySQL files of my website from the database directory because
I copied this class from a similar class I have in this app that
I copied this systemd service file from the lighttpd-package and adapted it to make
I copied a solution to another directory and changed all the Namespaces, removed TFS
I copied a part of a bigger project i'm working on, I didn't wrote

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.