showbuilder 0.0.7 → 0.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.
@@ -51,7 +51,7 @@ module Showbuilder
51
51
  self.controller_name.to_s.singularize
52
52
  end
53
53
 
54
- def call_object_methods(object, methods)
54
+ def call_object_methods(object, methods)
55
55
  unless object
56
56
  return
57
57
  end
@@ -1,12 +1,16 @@
1
1
  module Showbuilder
2
2
  module Corekit
3
+
3
4
  def html_contents
4
5
  contents = []
5
6
  result = yield contents
7
+
6
8
  if contents.count > 0
7
- contents.join(' ').html_safe
8
- else
9
- result
9
+ return contents.join(' ').html_safe
10
+ end
11
+
12
+ if result.respond_to?(:html_safe)
13
+ return result.html_safe
10
14
  end
11
15
  end
12
16
 
@@ -15,11 +19,11 @@ module Showbuilder
15
19
  self.html_contents(&block)
16
20
  end
17
21
  end
18
-
22
+
19
23
  def divc(option_class, &block)
20
24
  contents_tag :div, :class => option_class , &block
21
25
  end
22
-
26
+
23
27
  def currency_string(number)
24
28
  if number
25
29
  number_to_currency(number)
@@ -64,6 +68,6 @@ module Showbuilder
64
68
  text.to_s
65
69
  end
66
70
  end
71
+
67
72
  end
68
73
  end
69
-
metadata CHANGED
@@ -1,32 +1,22 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: showbuilder
3
- version: !ruby/object:Gem::Version
4
- hash: 17
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.8
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 7
10
- version: 0.0.7
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Ery Wang, Mario Du
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-06-12 00:00:00 Z
12
+ date: 2012-06-26 00:00:00.000000000 Z
19
13
  dependencies: []
20
-
21
14
  description: A Rails View Helper. Show model/s as view, form, table.
22
15
  email: ery@baoleihang.com
23
16
  executables: []
24
-
25
17
  extensions: []
26
-
27
18
  extra_rdoc_files: []
28
-
29
- files:
19
+ files:
30
20
  - lib/showbuilder.rb
31
21
  - lib/showbuilder/show_model_view.rb
32
22
  - lib/showbuilder/i18n_text.rb
@@ -42,36 +32,26 @@ files:
42
32
  - lib/showbuilder/show_form.rb
43
33
  homepage: https://github.com/ery/showbuilder
44
34
  licenses: []
45
-
46
35
  post_install_message:
47
36
  rdoc_options: []
48
-
49
- require_paths:
37
+ require_paths:
50
38
  - lib
51
- required_ruby_version: !ruby/object:Gem::Requirement
39
+ required_ruby_version: !ruby/object:Gem::Requirement
52
40
  none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- hash: 3
57
- segments:
58
- - 0
59
- version: "0"
60
- required_rubygems_version: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
45
+ required_rubygems_version: !ruby/object:Gem::Requirement
61
46
  none: false
62
- requirements:
63
- - - ">="
64
- - !ruby/object:Gem::Version
65
- hash: 3
66
- segments:
67
- - 0
68
- version: "0"
47
+ requirements:
48
+ - - ! '>='
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
69
51
  requirements: []
70
-
71
52
  rubyforge_project:
72
- rubygems_version: 1.8.24
53
+ rubygems_version: 1.8.10
73
54
  signing_key:
74
55
  specification_version: 3
75
56
  summary: A Rails View Helper.
76
57
  test_files: []
77
-