-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME
31 lines (21 loc) · 781 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
DisplayFlashHelper
==================
Just a little helper to make it easier to display notice, warning, and error messages. It will only
show flash[:success], flash[:notice], flash[:warning], or flash[:error] messages.
There are some default styles and icons that can be used.
rake display_helper:setup
Example
=======
In your controller:
def create
do_somthing
flash[:notice] = 'Something has been done.'
end
In your view (layout or template):
<%= display_flash %>
And it will create:
<div id="flash">
<div class="notice">Something has been done.</div>
</div>
Silk Icons from http://famfamfam.com/lab/icons/silk/, released under the Creative Commons Attribution 2.5 License
Copyright (c) 2008 Geoffrey Dagley, released under the MIT license