inline_forms 1.6.6 → 1.6.7

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.
@@ -2,7 +2,12 @@
2
2
  InlineForms::SPECIAL_COLUMN_TYPES[:file_field]=:string
3
3
 
4
4
  def file_field_show(object, attribute)
5
- link_to_inline_edit object, attribute, 'xxx' #image_tag( object.send(attribute).send(:url) )
5
+ o = object.send(attribute)
6
+ msg = o.to_s
7
+ if o.send(:present?)
8
+ msg = "<a href='#{o.send(:url)}'>#{o.send(:path).gsub(/^.*\//,'')}</a>".html_safe
9
+ end
10
+ link_to_inline_edit object, attribute, msg
6
11
  end
7
12
 
8
13
  def file_field_edit(object, attribute)
@@ -10,6 +15,6 @@ def file_field_edit(object, attribute)
10
15
  end
11
16
 
12
17
  def file_field_update(object, attribute)
13
- object.send(attribute + '=', params[attribute.to_sym])
18
+ object.send(attribute.to_s + '=', params[attribute.to_sym])
14
19
  end
15
20
 
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module InlineForms
3
- VERSION = "1.6.6"
3
+ VERSION = "1.6.7"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inline_forms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.6
4
+ version: 1.6.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-01 00:00:00.000000000 Z
12
+ date: 2012-12-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rvm