I'm thinking of taking on subforms in some way in admin_assistant.
When, say, you're creating a Product and would also like to create a
Product Category at the same time. I know that ActiveScaffold does
some sort of association subform thing, but I've held off on doing a
straight-on clone of that functionality, because I'd like to get a
sense of what people would actually specifically want out of such a
feature. Back when I was using ActiveScaffold I'd actually skipped
doing the subform stuff, so I don't have much of an opinion.
So, did AS handle subforms well? Does the new subforms stuff in Rails
2.3 work with the way you guys might like to do it? What have people's
experiences been like?
Francis
Yeah, I suppose part of what makes that a win for that use case is
that PhoneNumber is tightly bound to Person; a PhoneNumber record
without a corresponding Person isn't going to make much sense. So,
accordingly, anybody in a position to edit a Person record should also
be able to add/edit/delete PhoneNumbers.
As opposed to, say:
class ProductCategory < ActiveRecord::Base
has_many :products
accepts_nested_attributes_for :products, :allow_destroy => true
end
... a scenario where the Product is actually way more important than
the ProductCategory, and having a Product without a ProductCategory is
possibly quite useful.
For me, I actually don't have a specific security concern with it,
especially since most of the sites I work on don't have a very fine-
grained ACL: If you can edit one object in the DB you can edit almost
all of them, so making the distinction maybe isn't that useful. I
guess I'm just leery of making changes in the models of very big
sites, but I can't think of specific problems this would cause off the
top of my head ... maybe I should just get over it.