populate-me 0.0.17 → 0.0.18
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.
- data/lib/populate_me/mongo/crushyform.rb +3 -1
- data/populate-me.gemspec +2 -1
- metadata +2 -2
@@ -83,6 +83,7 @@ module PopulateMe
|
|
83
83
|
o[:select_options] = m.__send__(o[:select_options]) unless o[:select_options].kind_of?(Array)
|
84
84
|
select_options = o[:select_options].dup
|
85
85
|
if (o[:multiple] && !o[:input_value].nil? && o[:input_value].size>1)
|
86
|
+
# This if is for having the selected options ordered (they can be ordered with asm select)
|
86
87
|
o[:input_value].reverse.each do |v|
|
87
88
|
elem = select_options.find{|x| x==v||(x||[])[1]==v }
|
88
89
|
select_options.unshift(select_options.delete(elem)) unless elem.nil?
|
@@ -96,7 +97,8 @@ module PopulateMe
|
|
96
97
|
elsif key==:closegroup
|
97
98
|
out << "</optgroup>\n"
|
98
99
|
else
|
99
|
-
|
100
|
+
# Array case is for multiple select
|
101
|
+
selected = 'selected' if (val==o[:input_value] || (o[:input_value].kind_of?(Array)&&o[:input_value].include?(val)))
|
100
102
|
out << "<option value='%s' %s>%s</option>\n" % [val,selected,key]
|
101
103
|
end
|
102
104
|
end
|
data/populate-me.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'populate-me'
|
3
|
-
s.version = "0.0.
|
3
|
+
s.version = "0.0.18"
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
5
|
s.summary = "ALPHA !!! Populate Me is relatively complete but simple CMS"
|
6
6
|
s.description = "ALPHA !!! Populate Me is relatively complete but simple CMS. It includes a Rack middleware for putting in your Rack stack, and a bespoke MongoDB ODM. But Populate Me is not really finished yet."
|
@@ -12,3 +12,4 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.add_dependency('rack-golem')
|
13
13
|
s.add_dependency('json')
|
14
14
|
end
|
15
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: populate-me
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.18
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-10-
|
12
|
+
date: 2013-10-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack-golem
|