sal-engine 0.0.1 → 0.0.2
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 +4 -4
- data/README.md +11 -3
- data/config/initializers/error_span.rb +1 -1
- data/lib/sal/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 470fa477d17588a8ed849874c096d14bab7fce85
|
4
|
+
data.tar.gz: 3ea020033f21d68b6246dce69bd5565102088e2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb717d1df0c186e2cb96537bb467e1e03856fbdb9ed486b9d2f824f5d9102069c33714042f198e0e73196a11c1c73780e044ee8597ef29ede6fb0acffe0eb7c5
|
7
|
+
data.tar.gz: 183695f76016cd55709aabfb787f50df87d99932b27b7104596da83f6f224069c5bc60a68bc2ae1078ac5cbc0fa315e795aee7de087074ee9f17adbfa2f6438b
|
data/README.md
CHANGED
@@ -2,11 +2,19 @@
|
|
2
2
|
|
3
3
|
# What is this?
|
4
4
|
|
5
|
-
Sal (salt) is
|
5
|
+
Sal (salt) is something you add to almost every meal. I add sal to my Rails projects.
|
6
6
|
|
7
7
|
I found I always add a particular set of helpers, initializers and generators.
|
8
8
|
Better if they're distributed as a Rails engine.
|
9
9
|
|
10
|
+
# Installation
|
11
|
+
|
12
|
+
Add to your Rails app Gemfile:
|
13
|
+
```ruby
|
14
|
+
gem 'sal-engine'
|
15
|
+
```
|
16
|
+
And run `bundle`
|
17
|
+
|
10
18
|
# How does it taste?
|
11
19
|
|
12
20
|
## messages_bar helper
|
@@ -14,7 +22,7 @@ Will render:
|
|
14
22
|
```html
|
15
23
|
<div class="alert alert-success">anything</div>
|
16
24
|
```
|
17
|
-
…if
|
25
|
+
…if `flash[:notice]` contains anything.
|
18
26
|
|
19
27
|
Will render:
|
20
28
|
```html
|
@@ -82,7 +90,7 @@ To launch this generator:
|
|
82
90
|
bundle exec rails generate scaffold MyModel name:string -p --skip-test-framework
|
83
91
|
```
|
84
92
|
|
85
|
-
|
93
|
+
# Interesting, but…
|
86
94
|
|
87
95
|
It _fits my purposes_, which may be different from yours. You might like the idea
|
88
96
|
though: then fork it and call it **peppermint**, **curry** or whatever you prefer!
|
@@ -2,7 +2,7 @@ ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
|
|
2
2
|
message = Array(instance.error_message).join(', ')
|
3
3
|
|
4
4
|
if html_tag =~ /class="checkbox"/ || ((html_tag !~ /type="checkbox"/) && (html_tag !~ /label/))
|
5
|
-
%(<div class="has-error">#{html_tag}<span class="help-block"
|
5
|
+
%(<div class="has-error">#{html_tag}<span class="help-block">✖ #{message}</span></div>).html_safe
|
6
6
|
else
|
7
7
|
%(<div class="has-error">#{html_tag}</div>).html_safe
|
8
8
|
end
|
data/lib/sal/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sal-engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Cruz Horts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|