make 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/make/form.rb +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b2234e2d4176ca5874af7a9cdd95a9b63c32e10
|
4
|
+
data.tar.gz: 551c44234a30e2ca00a4838789449c734fb39645
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b874eb888f4ce1d9b98951ccec327d01aa2c6fc654a6b55c9402d8ad76524ab12cf9220c32a0536731264e405e9478379f77705007a9fa24cc25cf3a250ea58
|
7
|
+
data.tar.gz: b55665fd0b928d348c6645bdf311c92c2054b19ff3d7e2461ec5a54268871611a48284808889551718058119a0046f9d4d6e67b4c7484652bf432c36cee73323
|
data/lib/make/form.rb
CHANGED
@@ -58,7 +58,7 @@ class Form
|
|
58
58
|
# Similar to default, but instead of a hidden specific value you pass in an array and create a select/option field.
|
59
59
|
def select column, array, assoc = false
|
60
60
|
columnName = column.titleize
|
61
|
-
input = "\n\t<label>" + columnName + "\n\t</label>\n\t<select name=\"" + @modelName + "[
|
61
|
+
input = "\n\t<label>" + columnName + "\n\t</label>\n\t<select name=\"" + @modelName + "[" + column + "]\">"
|
62
62
|
if assoc #if association is checked true
|
63
63
|
array.each do |id|
|
64
64
|
val = column[0...-3].capitalize.constantize.find(id).attributes.values[1]
|
@@ -95,14 +95,14 @@ class Form
|
|
95
95
|
# Create text input labels
|
96
96
|
@columns.each do |column|
|
97
97
|
if column.include? 'password'
|
98
|
-
input = "\n\t<label>Password</label>\n\t<input type=\"
|
98
|
+
input = "\n\t<label>Password</label>\n\t<input type=\"password\" name=\"" + @modelName + "[password]\">"
|
99
99
|
@formMiddle.push(input)
|
100
100
|
if @password_confirmation
|
101
|
-
input = "\n\t<label>Confirm Password</label>\n\t<input type=\"
|
101
|
+
input = "\n\t<label>Confirm Password</label>\n\t<input type=\"password\" name=\"" + @modelName + "[password_confirmation]\">"
|
102
102
|
@formMiddle.push(input)
|
103
103
|
end
|
104
104
|
else
|
105
|
-
input = "\n\t<label>" + column.titleize + "\n\t</label>\n\t<input type=\"text\" name=\"" + @modelName + "[
|
105
|
+
input = "\n\t<label>" + column.titleize + "\n\t</label>\n\t<input type=\"text\" name=\"" + @modelName + "[" + column + "]\">"
|
106
106
|
@formMiddle.push(input)
|
107
107
|
end
|
108
108
|
end
|