-
Notifications
You must be signed in to change notification settings - Fork 36
user.wholesaler.created_at throws error on Account page #12
Comments
Hi sorry for the delay, I just got back from vacation :) This is a strange bug as wholesalers should have a created at field... Have you tried running the upgrade generator? This generator should reset the wholesalers' created at fields... |
I'm a big fan of vacations :-) I think you are right: that I had never run that. But, when I ran the Mysql2::Error: Can't DROP 'created_at'; check that column/key exists: ALTER I am wondering whether there is an error in the UpgradeSpreeWholesale def self.up def self.down Thanks, Patrick On Thu, Feb 9, 2012 at 11:44 AM, Spencer Steffen <
|
Commenting out those two lines should allow you to add the created_at and updated_at columns... give it a try and let me know how it goes :) |
OK ... I went ahead and commented out those lines and it seems to work without problems. Thanks for your help! |
You're welcome! Glad it worked out for ya :) |
Great extension! We're hoping to make good use of it. I am working with the 0.60.x branch.
When logged in as a wholesaler and going to "My Account," the extension throws the error: undefined method `created_at' for "#Wholesaler:0xb57f85a4":Wholesaler
This comes from line 4 of spree_wholesale-bab7a33485ad/app/views/hooks/_wholesale_customer.html.erb:
<h4 class="wholesale-customer-id"><%= t('wholesale_customer_since', { :time => @user.wholesaler.created_at }) %></h4>
To get around the issue, I am just replacing @user.wholesaler.created_at with @user.created_at
Is it normal that my Wholesaler objects do not include a "created_at" field?
The text was updated successfully, but these errors were encountered: