autotelik / datashift

Full Excel/CSV Import/Export facilities for Rails
http://www.autotelik.co.uk
Other
136 stars 75 forks source link

Missing delegate_belongs_to fields #58

Open autotelik opened 7 years ago

autotelik commented 7 years ago

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)