You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With Rails 5, you have to explicitly declare belongs_to :user, optional: true
in /models/order.rb
Otherwise, you will get this error when you try to create an order while not logged in ActiveRecord::RecordInvalid (Validation failed: User must exist):
The text was updated successfully, but these errors were encountered:
With Rails 5, you have to explicitly declare
belongs_to :user, optional: true
in /models/order.rb
Otherwise, you will get this error when you try to create an order while not logged in
ActiveRecord::RecordInvalid (Validation failed: User must exist):
The text was updated successfully, but these errors were encountered: