app/controllers/users_controller.rb in spree-0.6.0 vs app/controllers/users_controller.rb in spree-0.7.0

- old
+ new

@@ -7,15 +7,18 @@ actions :all, :except => [:index, :destroy] show.before do @orders = Order.checkout_completed(true).find_all_by_user_id(current_user.id) end - - create.after do - self.current_user = @user - end - - create.response do |wants| + + create do + flash nil wants.html { redirect_back_or_default(products_path) } + end + + create.after do + @user.roles << Role.find_by_name("user") + @user.save + self.current_user = @user end end