I have a model that has many affiliates, and this works to let me drag/drop
affiliates that a user has access to:
config.columns[:affiliates].form_ui = :select
config.columns[:affiliates].options = { :draggable_lists => true }
When I edit the User and it loads the Affiliates, it does so with this SQL:
Affiliate Load (0.4ms) SELECT `affiliates`.* FROM `affiliates`
This takes a long time in production, so I want to tell active scaffold to
just load [:id, :name] for the Affiliate model as that's all it needs for
the draggable lists.
It seems like this should be possible and easy, but maybe I'm just missing
the syntax. This does not work:
config.columns[:affiliates].form_ui = :select
config.columns[:affiliates].options = { :draggable_lists => true }
config.columns[:affiliates].includes = nil
config.columns[:affiliates].select_columns = [:id, :name]
Any suggestions?
--
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/activescaffold/-/iK8TcUPkq3MJ.
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.