g_sectioned_shower 1.0.7 → 1.0.8
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/History.txt +5 -0
- data/VERSION +1 -1
- data/g_sectioned_shower.gemspec +5 -4
- data/lib/g_sectioned_shower.rb +1 -1
- data/lib/g_sectioned_shower/view_helpers.rb +6 -0
- metadata +2 -2
data/History.txt
CHANGED
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.8
|
data/g_sectioned_shower.gemspec
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# Generated by jeweler
|
|
2
|
-
# DO NOT EDIT THIS FILE
|
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{g_sectioned_shower}
|
|
8
|
-
s.version = "1.0.
|
|
8
|
+
s.version = "1.0.8"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["C. Jason Harrelson (midas)"]
|
|
12
|
-
s.date = %q{2009-11-
|
|
12
|
+
s.date = %q{2009-11-16}
|
|
13
13
|
s.description = %q{A Guilded (http://github.com/midas/guilded/tree/master) component that creates adaptable show (detail) views of a single ActiveRecord object.}
|
|
14
14
|
s.email = %q{jason@lookforwardenterprises.com}
|
|
15
15
|
s.extra_rdoc_files = [
|
|
@@ -59,3 +59,4 @@ Gem::Specification.new do |s|
|
|
|
59
59
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
|
60
60
|
end
|
|
61
61
|
end
|
|
62
|
+
|
data/lib/g_sectioned_shower.rb
CHANGED
|
@@ -125,9 +125,15 @@ module GSectionedShower
|
|
|
125
125
|
handle_associated_many( html, ar_obj, reflection, section, methods, index )
|
|
126
126
|
elsif ['belongs_to', 'has_one'].include?( reflection.macro.to_s ) # Handle single relationships
|
|
127
127
|
handle_associated_single( html, ar_obj, reflection, section, methods, index )
|
|
128
|
+
elsif reflection.macro.to_s == 'composed_of'
|
|
129
|
+
handle_composed_of( html, ar_obj, methods, index )
|
|
128
130
|
end
|
|
129
131
|
|
|
130
132
|
end
|
|
133
|
+
|
|
134
|
+
def handle_composed_of( html, ar_obj, methods, index )
|
|
135
|
+
html << "<dt>#{methods[index].to_s.humanize}</dt><dd>#{ar_obj.send( methods[index] ).to_s}</dd>"
|
|
136
|
+
end
|
|
131
137
|
|
|
132
138
|
def handle_associated_single( html, ar_obj, reflection, section, methods, index )
|
|
133
139
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: g_sectioned_shower
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- C. Jason Harrelson (midas)
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-11-
|
|
12
|
+
date: 2009-11-16 00:00:00 -06:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|