make 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/make/form.rb +5 -5
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ea47078e6009a20f31565d2f5cda2184833f456
4
- data.tar.gz: ee51dd6c02f68363fe70fb1560ac7e300e300e8e
3
+ metadata.gz: 70616ccc2ecb97831d58bd6731363f2496c5aab5
4
+ data.tar.gz: a8a7472b78bd43124cf65178dae4e14272295b61
5
5
  SHA512:
6
- metadata.gz: 0aa383646810b3e4f32250342ad5dd61aaa369f1bcd3f5bdcd00edab38dc7b57b97479a02f070b8fb80515b50a81967a37caa8439b8a0a7ab3753d60f9f9a041
7
- data.tar.gz: 3ce14f8a8e09ffc83d6a823d7a30dc794d09851cdaa0c35871214931ef3c7e1bce35975b453df42c2808fbc28fa286a7162fcf90fa50ed6a144ec1d4c9b60476
6
+ metadata.gz: 19a824197a55ada82d465b74593df285cfb71bc8dfd5bbfe2efe75c916afca4a61d39afbd0e50b8a70f2f573193ab8d488423fab10ea845e75568c10d67961e8
7
+ data.tar.gz: 48e688f4ec8812110e3f7a6ffdf069c634335fab9da505d6cb449e7699921b6b98d3ec45d330cef4a4644afe5a6f06479a4785a6d9ca3e662d34b69b4a1dad46
@@ -58,15 +58,15 @@ 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 = '<label>' + columnName + '</label><select name="' + column + '" value="' + @modelName+'['column + ']">'
61
+ input = '<label>' + columnName + '</label><select name="' + column + '" value="' + @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]
65
- input += '<option value="' + @modelName+'[' + id.to_s + ']">' + val.to_s + '</option>'
65
+ input += '<option value="' + @modelName +'[' + id.to_s + ']">' + val.to_s + '</option>'
66
66
  end
67
67
  else #if no associations exist for array
68
68
  array.each do |item|
69
- input += '<option value="' + @modelName+'[' + item.to_s + ']">' + item.to_s + '</option>'
69
+ input += '<option value="' + @modelName +'[' + item.to_s + ']">' + item.to_s + '</option>'
70
70
  end
71
71
  end
72
72
  @potential_keys_to_ignore.push(column)
@@ -102,12 +102,12 @@ class Form
102
102
  @formMiddle.push(input)
103
103
  end
104
104
  else
105
- input = '<label>' + column.titleize + '</label><input type="text" name="'+ @modelName + '['+ column+']">'
105
+ input = '<label>' + column.titleize + '</label><input type="text" name="' + @modelName + '[' + column + ']">'
106
106
  @formMiddle.push(input)
107
107
  end
108
108
  end
109
109
  @defaults.each_pair do |key, value|
110
- input = '<input type="hidden" name="'+ @modelName + '['+ key.to_s+']" value="'+value.to_s+'">'
110
+ input = '<input type="hidden" name="'+ @modelName + '[' + key.to_s + ']" value="' + value.to_s + '">'
111
111
  puts input
112
112
  puts @formMiddle
113
113
  @formMiddle.push(input)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: make
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sara Wong