``` request.session().attribute('flash')[key] = [r...
# announcements
v
Copy code
request.session().attribute('flash')[key] = [requests: 1, value: value]
t
i don't know groovy, but if this is spark,
attribute(key)
will get a session attribute (which can be whatever). in this case it seems to be a map<key, pair>
think of it like this:
Copy code
val map = request.session().attribute('flash');
map[key] = [requests: 1, value: value]
so the code just updates a custom-attribute called "flash".. if you're not using this, you can remove the line
v
It's the map<key,pair> that's been really confusing me. With all of groovy's magic typing, I couldn't work out what the types were.
I've been trying to build a flash scope in kotlin-spark