El Thursday 23 April 2009 22:12:12 larrytheliquid escribió: > Creating a record from a model with a has_many works great, displaying > the full form of the child with a "Create Another" button. However, if > I add another nested relation then it seems to be defaulting to > the :select form_ui, e.g.:
crud subform is not implemented for associations in subforms (subforms inside subforms). I have never seen it in active_scaffold. Probably it will be easier if we change the code to use nested_forms from rails 2.3 > > class User < ActiveRecord::Base > has_many :posts > end > > class Post < ActiveRecord::Base > belongs_to :user > has_many :comments > end > > class Comment < ActiveRecord::Base > belongs_to :post > end > > class UsersController < Admin::ApplicationController > active_scaffold :users do |config| > end > end > > class PostsController < Admin::ApplicationController > active_scaffold :posts do |config| > # config.columns[:comments].form_ui = :crud > end > end > > class CommentsController < Admin::ApplicationController > active_scaffold :comments do |config| > end > end > > Like I said before, it looks like the :comments form_ui for post is > defaulting to :select here. I think in an older version you could get > the nested create subform by using form_ui :crud (like in the comment > of the code above) but that doesn't seem to exist anymore. > > I looked through all the "def active_scaffold_input_*" helpers but > couldn't find one for "crud". Is there a new way to do this? > > Thanks. > > -- Sergio Cambra .:: entreCables S.L. ::. Nicolás Guillén 6, locales 2 y 3. 50.018 Zaragoza T) 902 021 404 F) 976 52 98 07 E) [email protected] --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
