Ashley
Joined
30 Experience
0 Lessons Completed
0 Questions Solved
Activity
@all_payments = PaymentDetail.joins(:project).order('payment_details.created_at desc')
.union(PaymentError.joins(:project).order('payment_errors.created_at desc'))
.order('created_at desc')
Posted in Turbo stream problem
You may need to add a broadcast_to statement in your create action in the product controller like this:
def create
@product = Product.new(product_params)
if @product.save
ActionCable.server.broadcast_to('products', product: @product)
redirect_to products_path
else
render :new
end
end
This broadcast_to statement will send out a signal to the 'products' channel with the newly created product. With this signal, the view will be updated automatically with the newly created product without needing to refresh the page.
It is possible that the Passenger version you are using is not compatible with the version of Ruby you are using. Try updating both Passenger and Ruby to the latest versions and then redeploying your application. Additionally, check the Passenger documentation to make sure the Passenger configuration parameters are set correctly.