g_sectioned_shower 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ == 1.0.8 2009-11-16
2
+
3
+ * Added simple to_s support for aggregate associations (composed_of).
4
+
5
+
1
6
  == 1.0.7 2009-11-01
2
7
 
3
8
  * Fixed bug created in 1.0.6 with incorrect variable name (typo).
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.7
1
+ 1.0.8
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
- # DO NOT EDIT THIS FILE
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
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.7"
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-01}
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
+
@@ -4,7 +4,7 @@ $:.unshift(File.dirname(__FILE__)) unless
4
4
  require 'g_sectioned_shower/view_helpers'
5
5
 
6
6
  module GSectionedShower
7
- VERSION = '1.0.7'
7
+ VERSION = '1.0.8'
8
8
  end
9
9
 
10
10
  if defined?( ActionView::Base )
@@ -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.7
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-01 00:00:00 -05:00
12
+ date: 2009-11-16 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency