Yep, form_ui is what I ended up using..
Here is the config code....
class BooksController < AdminController
active_scaffold :book do |config|
config.columns[:authors].form_ui = :select
end
On Mar 22, 2:12 am, "Sergio Cambra .:: entreCables S.L. ::."
<[email protected]> wrote:
> On Domingo, 21 de Marzo de 2010 07:22:18 Sujee Maniyam escribió:
>
>
>
>
>
> > Hi,
> > I need a little help get AS work in a has_and_belongs_to_many (habtm)
> > situation. It is a classic books/authors models.
>
> > class Book < ActiveRecord::Base
> > has_and_belongs_to_many :authors
> > end
>
> > class Author < ActiveRecord::Base
> > has_and_belongs_to_many :books
> > end
>
> > In addition to 'books' and 'authors' table, I have a 'authors_books'
> > table.
>
> > As for controllers:
>
> > class AuthorsController < AdminController
> > active_scaffold :author
> > end
>
> > class BooksController < AdminController
> > active_scaffold :book
> > end
>
> > When I access BooksController, I see a sub-form for Author model.
> > I'd like to get a 'SELECT'
> > drop down list or authors.
> > (I used to use 'form_ui = :select' in the older versions)
>
> You can't get a select list with a HABTM, you can get a check boxes list using
> form_ui=:select
>
>
>
> > How can I do that in the latest AS (& Rails 2.3.5)
>
> > thanks in advance
> > sujee maniyam
>
> --
> Sergio Cambra .:: entreCables S.L. ::.
> Mariana Pineda 23, 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.