randym / activeadmin-axlsx

ActiveAdmin plugin using Axlsx for adding Excel (xlsx) download links for your resources
MIT License
82 stars 134 forks source link

Delay the initialization of resource columns until needed #38

Closed marcelmorgan closed 5 years ago

marcelmorgan commented 9 years ago

At the point of initialization, when running migrations and the table did not exist for the resource class at that point, it would fail with the following error:

ActiveRecord::StatementInvalid: <database-adapter>::UndefinedTable: ERROR:  relation
"<table-name-for-model>" does not exist

The inspiration for this fix came from https://github.com/randym/activeadmin-axlsx/pull/35