simple_show 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -48,7 +48,7 @@ module SimpleShow
48
48
  else
49
49
  value = options[:value] || @record.send(attr)
50
50
  end
51
- if value
51
+ if !value.nil?
52
52
  if options[:format].present?
53
53
  if [:datetime, :timestamp, :time, :date].include?(@record.class.columns_hash[attr.to_s].type)
54
54
  value = value.send(options[:format].is_a?(Symbol) ? :to_s : :strftime, options[:format])
@@ -67,5 +67,10 @@ module SimpleShow
67
67
  [SimpleShow.value_prefix, value, SimpleShow.value_suffix].compact.join.html_safe
68
68
  end
69
69
  end
70
+
71
+ def object
72
+ @record
73
+ end
74
+
70
75
  end
71
76
  end
@@ -1,3 +1,3 @@
1
1
  module SimpleShow
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
data/simple_show.gemspec CHANGED
@@ -15,6 +15,7 @@ Gem::Specification.new do |s|
15
15
  s.rubyforge_project = "simple_show"
16
16
 
17
17
  s.files = `git ls-files`.split("\n")
18
+ s.files = s.files.delete_if { |path| path =~ /\.rvmrc/ }
18
19
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
20
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
21
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_show
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 7
10
- version: 0.0.7
9
+ - 8
10
+ version: 0.0.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Philip Hallstrom
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-08-14 00:00:00 Z
18
+ date: 2011-08-22 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: "SimpleShow is to #show what SimpleForm is to #edit"
@@ -29,7 +29,6 @@ extra_rdoc_files: []
29
29
 
30
30
  files:
31
31
  - .gitignore
32
- - .rvmrc
33
32
  - Gemfile
34
33
  - README.rdoc
35
34
  - Rakefile
@@ -77,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
76
  requirements: []
78
77
 
79
78
  rubyforge_project: simple_show
80
- rubygems_version: 1.8.7
79
+ rubygems_version: 1.8.6
81
80
  signing_key:
82
81
  specification_version: 3
83
82
  summary: "SimpleShow is to #show what SimpleForm is to #edit"
data/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm gemset use simple_show