First off, sorry if this ends up being a duplicate post... I submitted
it a bit ago but it is not showing up:
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.:
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.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---