Hello
Helper override for export are called <column>_export_column:
https://github.com/activescaffold/active_scaffold_export/blob/master/lib/active_scaffold/
helpers/export_helpers.rb#L31[1]
They get only record argument, you can call your _column helpers from those.
Default
helpers rendering association columns in export are
format_plural_association_export_column and
format_singular_association_export_column and they use to_label method.
Probably
export gem should be updated to match format_association_column helper in
latest
ActiveScaffold which support column.options[:label_method] to use another
method
instead of to_label
Regards
El martes, 11 de agosto de 2020 17:48:23 (CEST) Dennis Bulgatz escribió:
When using the active_scaffold_export, can helper methods be used to render
associations?
If so, what is the pattern to define the helper?
Do not want users to see things like:
#<TrOdc::ActiveRecord_Associations_CollectionProxy:0x00007fd6268b6f38>
Tried this, which works fine in the list view
def sub_tdn_tr_odcs_column(record, options)
"ODC"
end
Thanks!
--
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][2].
To view this discussion on the web visit
https://groups.google.com/d/msgid/activescaffold/
03233d7e-89b7-4112-af16-cb1bb907592bn%40googlegroups.com[3].
--------
[1] https://github.com/activescaffold/active_scaffold_export/blob/master/lib/
active_scaffold/helpers/export_helpers.rb#L31
[2] mailto:[email protected]
[3]
https://groups.google.com/d/msgid/activescaffold/03233d7e-89b7-4112-af16-cb1bb907592bn%40googlegroups.com?utm_medium=email&utm_source=footer
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/activescaffold/2982556.flkEKDPCJG%40pc-sergio.