form_errors 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d5a6eb2baccd0c589befc6fb69b6a0a116b50d89
4
- data.tar.gz: c854e8f60b28a5c3c04677c511871598be5f3fb1
3
+ metadata.gz: 0a5fd01c234220ad2a9ebfce3febd09612fb2a73
4
+ data.tar.gz: ff935a9ddaee7797c4cc2a3b4ebac75ee35326e7
5
5
  SHA512:
6
- metadata.gz: 4fa0b65fa6b571b826689eeb55add741afa6d02a9ce664febceb080d31ed2e900ce56533ec27940c388adefb8698c466fb1f8401b8838c6f01f1fcd0db9257e5
7
- data.tar.gz: 65bc8f7b869ba024c56a1b60053b057743bcaa28ad68c7c282e76c6f230abdcc4ca46c4d1578c50f70e884be64dc0294ce4aea79d313912feb2c1b7bb956ff5c
6
+ metadata.gz: 3a70cb7fd1f901a2351e41928a8be078064e356b4044f220e56013d9b2482e57f624897616a8128fac5c03eb032a96adfb68d7e0b8503c39377b2d1e0b3f8008
7
+ data.tar.gz: 5ebc76532fd7c003159ef4c4f79e310b004adf27b0571d638233c66de05f280ded7028b429345d419dd2816e52fa63631bfb0c268e846c6459fd0eba54d6de98
data/README.md CHANGED
@@ -65,6 +65,12 @@ The `h2` message defaults to:
65
65
  "from being saved"
66
66
  ```
67
67
 
68
+ You can also pass html classes to the different DOM elements with:
69
+
70
+ ```ruby
71
+ display_errors(@object, 'Whoopsie', error_string_class: 'h4')
72
+ ```
73
+
68
74
  ## Contributing
69
75
 
70
76
  1. Fork it ( http://github.com/johnotander/form_errors/fork )
@@ -1,3 +1,3 @@
1
1
  module FormErrors
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
@@ -6,12 +6,12 @@ module FormErrors
6
6
  <<-HTML
7
7
  <div class="alert alert-danger alert-dismissable">
8
8
  <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
9
- <h2 class="#{ html.error_string_class }">
9
+ <h2 class="#{ html[:error_string_class] }">
10
10
  #{ get_error_string(error_string, object) }
11
11
  </h2>
12
- <ul class="#{ html.error_list_class }">
12
+ <ul class="#{ html[:error_list_class] }">
13
13
  #{ object.errors.full_messages.map do |msg|
14
- "<li class=\"#{ html.error_list_item_class }\">#{ msg }</li>"
14
+ "<li class=\"#{ html[:error_list_item_class] }\">#{ msg }</li>"
15
15
  end.join }
16
16
  </ul>
17
17
  </div>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: form_errors
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Otander