simple_flash_helper 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -1,6 +1,34 @@
1
1
  # SimpleFlashHelper
2
2
 
3
- TODO: Write a gem description
3
+ Simple Flash Helper is a Rails Flash Helper and Front-end Utility for handling flash messages dynamically.
4
+
5
+ ## USAGE
6
+
7
+ ### HTML Implementation
8
+
9
+ Usage is simple, just add `flash_helper` in your view, i.e.
10
+
11
+ # HAML
12
+ = flash_helper
13
+
14
+ # ERB
15
+ <%= flash_helper %>
16
+
17
+ This will automatically created a flash_helper div and add any and all flash messages there. It will use bootstrap classes like .alert .alert-success .alert-error, etc. If you're using bootstrap then it will be nicely stylized.
18
+
19
+
20
+ ### JavaScript Methods
21
+
22
+ You can also use the javascript helpers.
23
+
24
+ // Create a new flash message with javascript
25
+ flash_helper.create("message goes here!", "success");
26
+
27
+ You can also clear all of the flash message with:
28
+
29
+ flash_helper.clear();
30
+
31
+
4
32
 
5
33
  ## Installation
6
34
 
@@ -16,9 +44,6 @@ Or install it yourself as:
16
44
 
17
45
  $ gem install simple_flash_helper
18
46
 
19
- ## Usage
20
-
21
- TODO: Write usage instructions here
22
47
 
23
48
  ## Contributing
24
49
 
@@ -22,7 +22,7 @@ module FlashHelper
22
22
  html = html + content_tag(:div, raw(msg + close_alert_btn), :class => "alert #{css_class}") if keys.index key
23
23
  end
24
24
 
25
- return (content_tag :div, html, id: "flash_helper").html_safe
25
+ return (content_tag :div, html.html_safe, id: "flash_helper").html_safe
26
26
  end
27
27
 
28
28
  end
@@ -1,3 +1,3 @@
1
1
  module SimpleFlashHelper
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_flash_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-18 00:00:00.000000000 Z
12
+ date: 2013-07-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler