acts_as_linkable 0.0.4 → 0.0.5

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.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/acts_as_linkable_core.rb +2 -2
  3. metadata +4 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.0.5
@@ -7,7 +7,7 @@ module ActsAsLinkable
7
7
 
8
8
  module ActionViewExtensions
9
9
  def link(obj)
10
- return unless obj
10
+ raise "I can't link to nil." unless obj
11
11
  if (obj.class == Array) || (obj.class == ActiveRecord::Relation)
12
12
  obj.map{|v| link(v)}.to_sentence
13
13
  else
@@ -15,7 +15,7 @@ module ActsAsLinkable
15
15
  p[:partial] = "#{obj.class.name.tableize}/link" if p.empty?
16
16
  unless p[:partial].nil?
17
17
  obj_name = (p[:object_name] ||= obj.class.name.underscore).to_s.to_sym
18
- render :partial => p[:partial], :locals => {obj_name => obj}
18
+ (render :partial => p[:partial], :locals => {obj_name => obj}).strip
19
19
  else
20
20
  opts = {}
21
21
  link_attr = obj.link_attr
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_linkable
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tyler Gannon
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-15 00:00:00 -07:00
18
+ date: 2010-07-20 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency