Unable to use my own spreadsheet_column method
MattCrl opened this issue · 1 comments
For some reason, I'm trying to use my own spreadsheet_column method, like that :
@dossiers_xlsx = @dossiers.to_xlsx(spreadsheet_columns: :information_list_export)
But got this error :
NoMethodError (undefined method `each_with_index' for :information_list_export:Symbol)
The only way I made it work was by doing a Class method :
def self.information_list_export
column contents here
end
Then :
@dossiers_xlsx = @dossiers.to_xlsx(spreadsheet_columns: Dossier.information_list_export)
But it doesn't work like I need, the self method doesn't allow me to do what I want.
Am I missing something ? I'm actually on a project with the 2.0.0 version of spreadsheet-architect.
(Have to say it works perfectly when I don't overwrite the spreadsheet_column method, but here I need to)
If anyone can help me, thanks a lot !
This feature was added in v3.1.0. Please upgrade.