ProMotion-form 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/ProMotion/form/form.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87a3a00736090cbdefb01c2ed58cdaed794bab52
|
4
|
+
data.tar.gz: 6845c7881aa82670554d1f015b562bdf335c9805
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 355695f0de30f5a7b7a423133b09e6d76d61a0bd408ce1f553bdc91a9368bc3788d98383ea5c97ed0c28493ae375fbe12618546a77dce4840f71561af2b63a28
|
7
|
+
data.tar.gz: 36ee98cd47924f9c2f5e2c0f1d875fea4fd6e85843214f429e078db4cb24c4a4f797221c83b260770bee08353d937f1a13c715c719c4dc5fafa7437af91cb636
|
data/README.md
CHANGED
@@ -84,6 +84,7 @@ class AccountScreen < PM::FormScreen
|
|
84
84
|
}, {
|
85
85
|
name: :submit,
|
86
86
|
title: "Submit",
|
87
|
+
type: :button,
|
87
88
|
action: "my_action:"
|
88
89
|
}]
|
89
90
|
}]
|
@@ -101,7 +102,7 @@ All possible form field properties:
|
|
101
102
|
```ruby
|
102
103
|
{
|
103
104
|
label: "Name", # or title:
|
104
|
-
name: :name, #
|
105
|
+
name: :name, # defaults to symbol of snake_cased label/title
|
105
106
|
type: :string, # :default is default...like a button
|
106
107
|
options: [ "Water", "Fire", "Wind" ], # for a subform select (`type` can be anything)
|
107
108
|
placeholder: "Your name",
|
data/lib/ProMotion/form/form.rb
CHANGED
@@ -49,7 +49,7 @@ module ProMotion
|
|
49
49
|
def input_data(input, header, footer)
|
50
50
|
data = {}
|
51
51
|
data[:header] = header if header
|
52
|
-
data[:key] = input.
|
52
|
+
data[:key] = input[:name] || input[:title].downcase.gsub(/[^0-9a-z]/i, '_').to_sym
|
53
53
|
data[:type] = input[:type] if input[:type]
|
54
54
|
data[:title] = input[:label] || input[:title] || input[:name].to_s
|
55
55
|
data[:options] = input[:options] if input[:options]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ProMotion-form
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamon Holmgren
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ProMotion
|
@@ -117,3 +117,4 @@ signing_key:
|
|
117
117
|
specification_version: 4
|
118
118
|
summary: Adds PM::FormScreen support to ProMotion, similar to Formotion but lighter.
|
119
119
|
test_files: []
|
120
|
+
has_rdoc:
|