That was my initial hunch as well. And it is an AR object.

I believe that the fact that the user is a singleton resource matters.
E.g.
    map.resouce :user, :controller => "Users"

I modified the form_for and passed an explicit path with :url =>
user_path. This seems to work. But it is vert strange Rails doesn't
pick this up automatically. Then again maybe I'm defining the resource
wrong.

On Apr 21, 10:50 am, Frederick Cheung <[email protected]>
wrote:
> On 20 Apr 2009, at 20:11, harm wrote:
>
>
>
>
>
> > I have a simple User form with a simple Usercontroller.
> > The 'edit' action looks like:
> >  def edit
> >   �...@user = current_user
> >  end
>
> > In the view:
> > <% form_for(@user) do |f| %>
> > blah blah
> > <% end %>
>
> > What it generates is:
> >  <form action="/user.%23%3Cuser:0x34a498c%3E" class="edit_user"
> > id="edit_user_196" method="post">
> >  <div style="margin:0;padding:0"><input name="_method" type="hidden"
> > value="put" />
> >  <input class="inline" id="user_login" name="user[login]" size="30"
> > type="text" />.
> >  <input src="/images/buttons/registreren.png?1239978560"
> > type="image" />
> >  </form>
>
> > How does that form 'action' field becomes so b0rked?
>
> Is user an active record object ?
>
> Fred
>
> > Running Rails 2.3.2
>
> > Harm
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to