datashift icon indicating copy to clipboard operation
datashift copied to clipboard

Missing delegate_belongs_to fields

Open autotelik opened this issue 6 years ago • 0 comments

delegate_belongs_to fields do not appear in the template output

For example see Spree, the model Spree::Product has following definition

    delegate_belongs_to :master, :sku, :price, :currency, :display_amount, :display_price, :weight, :height, :width, :depth,
:is_master, :has_default_price?, :cost_currency, :price_in, :amount_in, :cost_price, :images

But none of these appear when generating an Excel template,

thor datashift:generate:excel -m Spree::Product -r tmp/product_template.xls

Suspect these will appear at least as instance methods so we need to make sure the catalogue class method can be configured to add those if requested - for example binder does not currently pass any options

model_method_mgr = ModelMethods::Manager.catalog_class(klass)

autotelik avatar Aug 23 '17 08:08 autotelik