Thanks a lot for the content. I have a button on my form, and I want to run a render, but I need to send the output to a server. I'm trying to show a message, but I'm having trouble because of the render. Here's my code: def my_button mydata = render json: @project, include: [params[:include]] ... flash[:notice] = "#{t('project')} was successfully published with ID #{identifier}." respond_to do |format| format.html { redirect_to(@project) } format.rdf { render template: 'rdf/show' } format.json { render json: @project, include: [params[:include]] } end end Any ideas on how to fix this? Thanks!
thank you, these hotwire videos have helped me a lot.
Happy to hear
Thank you for all the content you bring about the use of hotwire, it has helped me a lot.
It's a pleasure :)
Another cracking video. 👏 keep them coming
You bet :)
Thank you, the video was useful!
Happy to hear that 👍🏻
thanks a lot for the content!
You're welcome :)
very helpfull....do u have a blog on more about rails models/controllers logic stuff
I do have a blog at mixandgo.com. But I'm not sure what you mean by models/controller logic.
Very nice
Thank you Marv
the flash is super usefull
flash keep is a cool tidbid
👍👍👍👍
Thanks a lot for the content. I have a button on my form, and I want to run a render, but I need to send the output to a server. I'm trying to show a message, but I'm having trouble because of the render.
Here's my code:
def my_button
mydata = render json: @project, include: [params[:include]]
...
flash[:notice] = "#{t('project')} was successfully published with ID #{identifier}."
respond_to do |format|
format.html { redirect_to(@project) }
format.rdf { render template: 'rdf/show' }
format.json { render json: @project, include: [params[:include]] }
end
end
Any ideas on how to fix this? Thanks!
You can use add_flash_types :foo and do redirect_to link, foo: "message".
Cool tip. Thanks for sharing.