error_messages_for_helper 1.1.0 → 1.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.
- checksums.yaml +7 -0
- metadata +25 -46
- data/README +0 -56
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c74f6694f62cf56ea6c621c3d0f09757bd18a62d
|
4
|
+
data.tar.gz: 14fd486364f430ef93a718bee6af9f904d8caf53
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a53e6ad474ace4292f85d0ae0a813ce17de5738b96f45e17e6bcea5519c81d1fd0f8202e4f3e9af462a8841c7eb2056ef073e75996ed3b00f153a50fc776269c
|
7
|
+
data.tar.gz: d8e521af351b2760898ffbf435562e58ba696ca56b44f72b3e913a02ca8981a662c8a2b86f6d60321537e1db2ac466395ea7aa07122032afe09871a56c3483db
|
metadata
CHANGED
@@ -1,69 +1,48 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: error_messages_for_helper
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 1
|
9
|
-
- 0
|
10
|
-
version: 1.1.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.1
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
13
|
-
-
|
6
|
+
authors:
|
7
|
+
- Damian Baćkowski
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
10
|
cert_chain: []
|
17
|
-
|
18
|
-
date: 2012-09-21 00:00:00 Z
|
11
|
+
date: 2013-10-04 00:00:00.000000000 Z
|
19
12
|
dependencies: []
|
20
|
-
|
21
|
-
|
13
|
+
description: error_messages_for_helper provides a simple helper to show ActiveRecord
|
14
|
+
validation errors (just like old helper error_messages_for for Rails-2.3.x).
|
22
15
|
email: damianbackowski@gmail.com
|
23
16
|
executables: []
|
24
|
-
|
25
17
|
extensions: []
|
26
|
-
|
27
18
|
extra_rdoc_files: []
|
28
|
-
|
29
|
-
files:
|
19
|
+
files:
|
30
20
|
- Rakefile
|
31
21
|
- lib/error_messages_for_helper.rb
|
32
22
|
- test/error_messages_for_helper_test.rb
|
33
23
|
- test/test_helper.rb
|
34
|
-
- README
|
35
24
|
homepage: https://github.com/paki-paki/error_messages_for_helper
|
36
|
-
licenses:
|
37
|
-
|
25
|
+
licenses:
|
26
|
+
- MIT
|
27
|
+
metadata: {}
|
38
28
|
post_install_message:
|
39
29
|
rdoc_options: []
|
40
|
-
|
41
|
-
require_paths:
|
30
|
+
require_paths:
|
42
31
|
- lib
|
43
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
none: false
|
54
|
-
requirements:
|
55
|
-
- - ">="
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
hash: 3
|
58
|
-
segments:
|
59
|
-
- 0
|
60
|
-
version: "0"
|
32
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
33
|
+
requirements:
|
34
|
+
- - '>='
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '0'
|
37
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - '>='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
61
42
|
requirements: []
|
62
|
-
|
63
43
|
rubyforge_project:
|
64
|
-
rubygems_version:
|
44
|
+
rubygems_version: 2.0.3
|
65
45
|
signing_key:
|
66
|
-
specification_version:
|
46
|
+
specification_version: 4
|
67
47
|
summary: Active Record error messages helper for Rails 3.2.x
|
68
48
|
test_files: []
|
69
|
-
|
data/README
DELETED
@@ -1,56 +0,0 @@
|
|
1
|
-
# ErrorMessagesForHelper #
|
2
|
-
|
3
|
-
Rails 3.2.x error_messages_for_helper plugin.
|
4
|
-
|
5
|
-
|
6
|
-
### Example ###
|
7
|
-
|
8
|
-
```ruby
|
9
|
-
<%= form_for :test, :url => {:action => 'create'}, :html => {:method => :post} do |f| %>
|
10
|
-
<%= error_messages_for :test %>
|
11
|
-
<%= f.text_field :name %>
|
12
|
-
<%= f.text_field :age %>
|
13
|
-
<% end %>
|
14
|
-
```
|
15
|
-
|
16
|
-
When @test.errors is not empty error_messages_for will output:
|
17
|
-
|
18
|
-
```html
|
19
|
-
<div class="error_explanation">
|
20
|
-
<h2>Unable to save data.</h2>
|
21
|
-
<p>Errors list:</p>
|
22
|
-
<ul>
|
23
|
-
<li>Can't be empty</li>
|
24
|
-
<li>Must be integer</li>
|
25
|
-
<li>
|
26
|
-
</div>
|
27
|
-
```
|
28
|
-
|
29
|
-
### Customize ###
|
30
|
-
|
31
|
-
For custom messages in your locale put this section:
|
32
|
-
|
33
|
-
error_messages_for:
|
34
|
-
header_message: 'Unable to save data.'
|
35
|
-
error_list: 'Errors list:'
|
36
|
-
|
37
|
-
You can set global CSS class by html_options:
|
38
|
-
|
39
|
-
```ruby
|
40
|
-
ErrorMessagesForHelper.html_options(:class => 'alert alert-error')
|
41
|
-
```
|
42
|
-
|
43
|
-
output:
|
44
|
-
|
45
|
-
```html
|
46
|
-
<div class="alert alert-error">
|
47
|
-
<h2>Unable to save data.</h2>
|
48
|
-
<p>Errors list:</p>
|
49
|
-
<ul>
|
50
|
-
<li>Can't be empty</li>
|
51
|
-
<li>Must be integer</li>
|
52
|
-
<li>
|
53
|
-
</div>
|
54
|
-
```
|
55
|
-
|
56
|
-
Copyright (c) 2012 [Damian Baćkowski], released under the MIT license
|