It is not supposed to do this, I will try to recreate your situation and
look into whats going on.

On Tue, Apr 7, 2009 at 3:05 AM, johnnybutler7 <[email protected]>wrote:

>
> Think my issue may be related,
>
> http://groups.google.co.uk/group/activescaffold/browse_thread/thread/93680b959ea10930
>
> On 6 Apr, 10:12, "[email protected]" <[email protected]> wrote:
> > Hi
> >
> > I have the following models :
> >
> > class Company < ActiveRecord::Base
> >   has_many :contacts, :as => :contactable
> > end
> >
> > class User < ActiveRecord::Base
> >   has_many :contacts, :as => :contactable
> > end
> >
> > class Contact < ActiveRecord::Base
> >   belongs_to :contactable, :polymorphic => true
> > end
> >
> > and the following controllers :
> >
> > class CompaniesController < ApplicationController
> >   active_scaffold :company do |c|
> >     ....
> >     c.create.columns = [ :name, : address, :contacts ]
> >     c.update.columns = [ :name, : address, :contacts ]
> >     ....
> >   end
> > end
> >
> > class UsersController < ApplicationController
> >   active_scaffold :company do |c|
> >     ....
> >     c.create.columns = [ :name, : address, ..., :contacts ]
> >     c.update.columns = [ :name, : address, ...., :contacts ]
> >     ....
> >   end
> > end
> >
> > class ContactsController < ApplicationController
> >   active_scaffold :contact do |c|
> >     ...
> >     # category is : :phone, :web, :email, :skype, :mobile, :fax
> >     c.subform.columns = [ :category, :content ]
> >   end
> > end
> >
> > If I use the create (or update) form to add (or modify) a company (or
> > an user), I have a subform to add some contacts. I have a button
> > called "Create another" to add a row to fill a new contact..
> > But the button "Create another" executes like a submit of the form  :
> >
> > I filled the form of the company, I filled the form of the first
> > contact, I clicked on "Create another" and it validates the all form,
> > returns to the "Companies List", creating the first contact..
> >
> > I missed something ??
> >
> > VIncent
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to