#317 ✓resolved
Priit Tamboom

adva_user: fields_for does not honor nested attributes

Reported by Priit Tamboom | June 11th, 2009 @ 09:26 AM

I have trouble with nested attributes for /user/new.html.erb view at adva_users engine. When I adda nested attributes for /signup page then fields_for view helper does not honor nested attributes correctly. It should generate key such as user_subscriptions_attributes... but will generate wrong user_subscriptions without "attributes" (so it means nested attributes are not triggerd some reason). By the way, everywhere else it works correctly, I have tested it with adva_cms and adva_newsletter and same code works even with /session/new.html.erb aka /login.

Currently I haven't figure out what interferce with /signup, so I need some time to diggest this problem, any hint is welcome.

I have pushed current code with a bug showcase to git://github.com/priit/adva_cms.git, just look at /signup vs /login where login produces nested attributes but /signup does not.

Comments and changes to this ticket

  • Priit Tamboom

    Priit Tamboom June 11th, 2009 @ 09:41 AM

    • State changed from “new” to “resolved”

    Sometimes writing down the problem is helping to think. I got it working after suspecting to strongly about some interface-wodoo and not seeing the basic problem :-)

    if was:

    <% form_for :user, :url => user_path, :html => {:id => 'register'} do |f| %>
    

    and I got nested attributes honored after giving @user variable instead of :user symbol.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<p>Cutting edge cms, blog, wiki, forum ... plattform.</p>

<p>Find the code on <a href="http://github.com/svenfuchs/adva_cms/tree/master">GitHub: adva cms</a></p>

<p>Part of the business application framework <a href="http://www.advabest.org/">adva best</a>.</p>

People watching this ticket

Tags

Pages