All Questions
Tagged with toastr ruby-on-rails
11 questions
2
votes
0
answers
1k
views
Rails 7 toastr using importmaps
Im trying to use toastr to display a message. Im using rails 7 but Im unsure if i have it imported and implemented correctly
import { Controller } from "@hotwired/stimulus";
import { ...
0
votes
1
answer
217
views
toastr js CSS disable background-color on Rails project
When I call toastr.error or the others (info, success...) the background-color is not respect (or it is disabled). It is "forced" to white. Show the inspect image bellow to understand (I ...
1
vote
0
answers
590
views
Toastr notifications not rendering in Rails web app
I'm beginning with Rails and I want to display error messages in my webapplication with Toastr but it doesn't render. I probably missed something or the tutorial that I am following is deprecated ...
0
votes
1
answer
2k
views
Toasts notifications not displaying on rails
Im trying to add toast messages on login/logout, but i get no toast.
Thank u for any advice!
gemfile
gem 'devise'
gem 'toastr-rails'
app\javascript\packs\application.js
require("@rails/ujs").start(...
4
votes
2
answers
5k
views
How do you add toastr-rails gem to Rails 6 project?
I am trying to add the toastr gem to my Rails 6 project. I also have the devise gem installed.
I do not understand webpacker and how to make toastr-rails webpacker friendly.
I have read all the ...
0
votes
0
answers
297
views
How do I pass Rails5 flash notification to toastr in a form_for with remote: true without reloading the page?
I am building a basic CRUD app and I have a form_for that is set up for ajax with remote: true. The form works, as do the notifications, but I can't get it integrate with toastr. Essentially, this is ...
0
votes
1
answer
761
views
Rails: undefined local variable or method `resource' Toastr Rails
I wanted to add toastr-rails to my application and now I'm getting the following error.
undefined local variable or method `resource' for #<#:0x854eb18>
In the first application everything ...
2
votes
4
answers
4k
views
rails-toastr: add a close button
I'm using the rails-toastr gem (Rails 5.0.0.1) and I want to add a close button to the toasters.
I followed the instructions and added links to toastr.css and toastr.js in application.html.erb. Then ...
1
vote
3
answers
7k
views
How can I customize the look of the notifications - toastr-rails
I'm trying customize the position of the toast.
I tried do that, but it doesn't works:
applications.js
//= require jquery
//= require toastr
//= require jquery_ujs
//= require ...
1
vote
1
answer
951
views
Toastr message rendering issue
I am having difficulty getting Toastr to work within my application.
Right now I have the following code that I wrote so that Toastr error messages would occur if a user did not input the correct ...
5
votes
1
answer
6k
views
Rails 4 - Toaster notifications rather than flash notifications
I am using this library, (https://github.com/CodeSeven/toastr) and I am trying to push my Flash notifications to the javascript function Toastr has provided for me. How do I call this function for ...