This project is archived and is in readonly mode.
Flash convenience methods "notice" and "alert" should also be available for FlashNow
-
linki
- Tag changed from flash, rails3 to flash, patch, rails3
I like the idea and created a patch to add that behaviour.
I added:
flash.now.alert=(message)
flash.now.notice=(message)It's my first patch I ever created for the rails source, so if I did anything wrong, please tell me.
-
Rizwan Reza
- Milestone cleared.
- State changed from new to verified
- Assigned user set to Yehuda Katz (wycats)
+1 Applies cleanly.
-
Josh Kalderimis
+1 But could you make some tests for this linki, this makes sure the functionality stays consistent
-
Rizwan Reza
There are no tests for flash there from before, so I think this is good to go. Or may be we should go about adding tests for flash completely.
-
Rizwan Reza
- Tag changed from flash, patch, rails3 to bugmash, flash, patch, rails3
-
José Valim
Please do improve the test suite!
-
Rizwan Reza
- Assigned user changed from Yehuda Katz (wycats) to Rizwan Reza
-
Anil Wadghule
I've attached a patch with necessary tests.
-
PacoGuzman
I've attached a patch with the accessors and necessary test
-
PacoGuzman
Nopw with the patch already attached. upss!
-
Anil Wadghule
I've attached a patch with necessary tests.
-
PacoGuzman
Forget my comments, excuse me!
-
Repository
- State changed from verified to resolved
(from [2d84f24af5cb0854a316929fa0d0720773be2162]) Add tests for convenience methods #notice and #alert to flash.now [#4369 Flash convenience methods "notice" and "alert" should also be available for F... state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/2d84f24af5cb0854a316929fa0d072... -
Michael Raidel
just wanted to upload patch for ticket 4369 and recognized that there is already an applied patch. But the patch doesn't include all accessors from the original flash and is also a little unDRY so I am attaching my patch nevertheless.
-
Michael Raidel
I've attached a patch. This one only include the tests I wrote. Both tests essentially test the same thing.
-
Michael Raidel
state:open
-
José Valim
- State changed from resolved to open
- Assigned user changed from Rizwan Reza to José Valim
-
linki
Michael's code looks better but the question is do we need getters for "flash.now.notice" and "flash.now.alert"?
You'll never use "flash.now.notice" in any view, you only use "flash.notice" and either it survived the last request or it didn't depending on whether you set it through flash or flash.now
but it might be helpful in a controller..
