Skip to content
This repository has been archived by the owner on Mar 3, 2021. It is now read-only.

NoMethodError in Spree::Admin::SuppliersController#create #7

Closed
rschumann opened this issue Apr 28, 2014 · 5 comments
Closed

NoMethodError in Spree::Admin::SuppliersController#create #7

rschumann opened this issue Apr 28, 2014 · 5 comments

Comments

@rschumann
Copy link

Hi,
I have this problem on create supplier:
branch: stripe_2_2

NoMethodError in Spree::Admin::SuppliersController#create
undefined method `+' for nil:NilClass

recipient = Stripe::Recipient.create(
  :name => (self.merchant_type == 'business' ? self.name : self.address.first_name + ' ' + self.address.last_name),
  :type => (self.merchant_type == 'business' ? 'corporation' : "individual"),
  :email => self.email,
  :bank_account => self.bank_accounts.first.try(:token)
@JDutil
Copy link
Member

JDutil commented Apr 28, 2014

The address needs a first and last name instead of being nil.

@rschumann
Copy link
Author

Yes ;) can you help me to fix this please. It's working for you?

@JDutil
Copy link
Member

JDutil commented Apr 28, 2014

Yes my signup form has the first and last name fields on it. I still have lot's of work to do on this extension. I'm in the middle of breaking apart spree drop ship and moving most of the logic from there into this extension for anything related to product management. This extension is still very much a work in progress, but it is almost there thanks to a lot of awesome changes being integrated with the 2.2.x upgrade.

Pull requests fixing any issues or adding failing specs for any issues you run into would be great.

@JDutil JDutil closed this as completed in bd2b4fc Apr 28, 2014
@JDutil
Copy link
Member

JDutil commented Apr 28, 2014

I've made an update to fix this in the master branch. You can view that commit to backport any changes you need to 2-2-breakage branch, but I really don't recommend using that branch. There are dramatic changes coming to spree_drop_ship & spree_marketplace in order to better separate the concerns of each component. Drop ship extension is slimming down to only provide the bare bones drop shipping stuff such as managing shipments and stock, and everything else is being moved to this extension as the other stuff is really only required if your trying to run a marketplace that allows suppliers to manage their products as well.

@JDutil
Copy link
Member

JDutil commented Apr 28, 2014

In other words if your building a new application I would be targeting Spree 2.3.x rather than Spree 2.2.x as once I'm done these extension updates I don't intend to support the older versions of them anymore as its mostly backwards incompatible, and the updated versions should in theory finish dealing with all the various todos listed in the readmes

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants