Flash messages are used to notify the user that something has occurred. For example, a record has been created or they attempted to access something they were not authorized to do.
Questions tagged [flash-message]
408 questions
5
votes
1 answer
Sending data to a modal without redirecting in nodejs
I am using passport and flash to manage authentication. I want to send flash messages back to the UI per the documentation. In my scenario in the UI I am using a modal so doing a
res.render('login.ejs', { message: req.flash('loginMessage')…

Weston
- 143
- 1
- 8
5
votes
1 answer
Zend flash messenger
I have a form and the submit button check if true or false.
If it's true redirect to another page.
If it's false stay on the same page and print the error message.
The error message is print out with a flash messenger.
But, in some case it doesn't…

Ya Fa Su
- 160
- 1
- 4
- 13
5
votes
2 answers
Flash Message disappears on redirect in Symfony 2.1
I'm migrating from Symfony 2.0 to Symfony 2.1.
I have the following simple code on my controller:
public function createEntidadeAction() {
$this->get('session')->getFlashBag()->set('error', 'message');
return…

Fonsini
- 693
- 8
- 18
5
votes
4 answers
Rails flash message helper
I've setup a flash helper:
def flash_message
flash.each do |key, msg|
content_tag :div, msg, :id => key, :class => 'flash'
end
end
And I've put this in my application.html.erb:
<%= flash_message %>
And it's returning content like…

daryl
- 14,307
- 21
- 67
- 92
4
votes
1 answer
node.js expressjs flashmessage ajax
I'm trying to get some flashmessages from an express app.
My understanding is that flash messages in express (eg: req.flash('info',message)) are stored on the server, and only upon next request is it loaded into the view?
So if I have a one page…

Mark
- 32,293
- 33
- 107
- 137
4
votes
1 answer
Object of type GeoPoint is not JSON serializable
I want to create an API that has to recover data from firestore and expose them in json but I am facing the error of:
Object of type GeoPoint is not JSON serializable
What's wrong? This My code:
#!/usr/bin/env python
import firebase_admin
import…

Mr Magloire
- 773
- 8
- 14
4
votes
4 answers
How to get failureFlash to show flash message in Passport.js local strategy?
I'm trying to implement a passport-local strategy using passport.js
I would like it so that when a user tries to sign up with an email that is already taken, it flashes a message 'That email is already taken'.
I've added the line failureFlash: true…

doctopus
- 5,349
- 8
- 53
- 105
4
votes
1 answer
laravel difference of session::flash and request->session->flash
i wonder that what is the differences in performance and usage advantage ?
public function delete(){
\Session::flash('success', __('common.message.success.delete'));
}
vs
public function delete(){
$request->session()->flash('success',…

Hanik
- 317
- 2
- 6
- 25
4
votes
1 answer
Flash message require session
I'm trying to use express-flash in a standard web express js app. I don't want to use session, because I want to do the app as stateless as possible, but when I try to use without session, the app show me this error:
req.flash() requires…

chemitaxis
- 13,889
- 17
- 74
- 125
4
votes
1 answer
Mvc flash message as a partial view
I'm using a FlashHelper to show flash message to users and I need to show partial view istead of default flash message. How can I do that or is that possible or not?.
I need a helper like that:
Flash.Success("_FlashMessagePartial",model)
Or Is…

Tolga Kısaoğulları
- 638
- 5
- 17
4
votes
1 answer
SlimPHP v3 how to display flash message on view
In their new documentation there isn't anything for flash messages.
I installed the flash extension from their github repository (slimphp/Slim-Flash). Everything works fine, I can add messages and can also get these messages.
// Adding a…

deflox
- 103
- 2
- 8
4
votes
2 answers
Setting display time of flash message in laravel 4.2
Normally in Laravel 4.2 when we create flash message by
Session::flash('message','This is flash message');
and display it by
Session::get('message');
It will disappear when we refresh the page.
The question is how could we set the display time of…

Alex
- 359
- 3
- 15
4
votes
1 answer
Redirect back with flash message for the layout template
In my controller I have a function to login a user.
In case the login was successful I can simply use return Redirect::back().
My problem starts when the credentials are incorrect and I want to redirect with a flash message.
I know I can chain the…

Matanya
- 6,233
- 9
- 47
- 80
4
votes
1 answer
How to Properly Use Flash Messages in Rails 3.2
I'm trying to simply render a flash message when a form is improperly submitted using Twitter-Bootstrap's styling.
I'm obviously missing something because I keep getting the following error:
TypeError in NewslettersController#create
can't convert…

DaveG
- 1,203
- 1
- 25
- 45
3
votes
3 answers
undefined method `flash' for #
I have stuff with Ruby on Rails 3
I try this simple code
def index
flash[:notice] = "ok"
respond_to do |format|
format.html # index.html.erb
end
end
it does not work
NoMethodError in DashboardsController#index
undefined…

user1148210
- 57
- 1
- 5