ActiveScaffold supports enabling groups in select defining :optgroup in columsn 
options:

config.columns[:column_name].options[:optgroup] = :column_to_group

When optgroup option is set, active_scaffold_grouped_options(column, 
select_options, 
optgroup) will be called to return options for select grouped by optgroup 
column.

As you need to group using tree structure instead of grouping by column, you 
could 
override active_scaffold_grouped_options(column, select_options, optgroup) 
helper method 
to return options as a tree. You only need to enable calling 
active_scaffold_grouped_options setting :optgroup to true for example:

config.columns[:column_name].options[:optgroup] = true

El Jueves, 28 de mayo de 2015 10:59:15 loveand light escribió:
> HI,
> 
> Does anyone know a good way to display the options in an acts_as_tree list?
> I am trying to display categories that go 3 layers deep looks like;
> 
> Option 1
>      Option 1.1
>      Option 1.2
>      Option 1.3
> Option 2
>      Option 2.1
>      Option 2.2
>            Option 2.2.1
> 
> I am currently using the form_ui :chosen which is wonderful for other lists
> except with acts_as_tree need to display the listings like the above for
> selection for a has_many relationship.
> 
> Any advice would be totally appreciated!
> Thanks in advance.
> Mark

-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails Gem" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/activescaffold.
For more options, visit https://groups.google.com/d/optout.

Reply via email to