Hi Dennis

There is a helper method, column_renders_as, which should return :subform for 
column travels. It would return :field if subform action has been excluded from 
travels controller, form_ui has been set for the column, or a helper 
_form_column has been defined for the column. Defining 
sub_tdn_travels_show_column shouldn't affect.

Was sub_tdn_travels_show_column being called in create/update form? Or was it 
displaying a list of checkboxes instead of subform?

What method is called with the super line? Super would call another method 
with the same name, and ActiveScaffold doesn't define 
sub_tdn_travels_form_column, so you must have defined that method somewhere 
else.

Regards

El jueves, 30 de marzo de 2023 0:32:39 (CEST) Dennis Bulgatz escribió:
> Hi Sergio,
> 
> i have a resource that a column with a has_many association.
> 
> For the "show" action I have a column helper that renders the children as a
> table.
> 
>   def sub_tdn_travels_*show_column*(record, input_name)
>     display_standard_table(
>       [
>         { :name => 'line_item_number', :display_name => 'Item' },
>         { :name => 'purpose', :display_name => 'Purpose' },
>         { :name => 'number_of_travelers', :display_name => 'Traveler(s)' },
>         { :name => 'number_of_nights', :display_name => 'Night(s)' },
>         { :name => 'number_of_days', :display_name => 'Days(s)'},
>         { :name => 'from_date', :display_name => 'From'},
>         { :name => 'to_date', :display_name => 'To'},
>         { :name => 'destination', :display_name => 'Destination'}
>     ], record.travels)
>   end
> 
> This has stopped the create/update actions on the parent from showing the
> AS form/partial that can create new child records.
> 
> Not sure what is going on, but can i restore partial with a call in the
> helper method:
> 
>   def sub_tdn_travels_*form_column*(record, input_name)
>       super(record,input_name) #THIS IS NOT RIGHT, but the idea is to use
> default partial
>   end
> 
> Thanks!
> 
> Dennis




-- 
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/5958049.lOV4Wx5bFT%40pc-sergio.

Reply via email to