inline_forms 3.0.46 → 3.0.47

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f489511fba3ebb3ae294a600e31c4bf111c76c15
4
- data.tar.gz: 238efdfb7e8fae96d8ef12c7629aba4f53949986
3
+ metadata.gz: 35dfebed2cc12956aaec59917de795b61a188cee
4
+ data.tar.gz: a2c1f107f5fb4c499fe842f31f2b40f80f50a43e
5
5
  SHA512:
6
- metadata.gz: 756e6867e356dfc1f44918ad146dfedfac99bd265374f8a16095722dd48b2db6d352f424fb39152ff20f64695be09f0deb1bdca408af23885a063b89db83f90f
7
- data.tar.gz: d6508999a0af3fa99da4d0900fdd662bd9ec322c181df17cd96a434949e93fa46cd8ffaef2a176c73239be870dbe9a838040f309d1455bf6778b6b03bccc3114
6
+ metadata.gz: d540d2a21825619c830950ff76ac54d590ff9add22a8bb433bb442677f6732bf1fbeab9177f25a2d7499d7cc64598b4834eef9e8ce2e913a995b19544c11ffd0
7
+ data.tar.gz: fa8279d95e33ec7d26b9d31b25056e62d23400f21c231de405ce4fbadfff20b9869b0e24c98a866e88417644d361e43121ef3941c81c13f1d6d684f3abb386b9
@@ -15,7 +15,7 @@ def dropdown_edit(object, attribute)
15
15
  attr = object.send attribute
16
16
  presentation = "_presentation"
17
17
  presentation = "_dropdown_presentation" if attr.respond_to? "_dropdown_presentation"
18
- klass = attribute.to_s.singularize.camelcase.constantize
18
+ klass = object.send(attribute).class
19
19
  if cancan_enabled?
20
20
  values = klass.accessible_by(current_ability)
21
21
  else
@@ -30,4 +30,3 @@ def dropdown_update(object, attribute)
30
30
  foreign_key = object.class.reflect_on_association(attribute.to_sym).options[:foreign_key] || attribute.to_s.foreign_key.to_sym
31
31
  object[foreign_key] = params[('_' + object.class.to_s.underscore).to_sym][attribute.to_s.foreign_key.to_sym]
32
32
  end
33
-
@@ -36,10 +36,9 @@ def text_area_edit(object, attribute)
36
36
  :id => "textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}",
37
37
  :ckeditor => { :width => '100%',
38
38
  :height => '200px'
39
- } +
40
- "<script>delete CKEDITOR.instances['textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}']</script>".html_safe
41
-
42
- )
39
+ }
40
+ ) +
41
+ "<script>delete CKEDITOR.instances['textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}']</script>".html_safe
43
42
  else
44
43
  text_area_tag attribute, object[attribute], :class => 'attribute_text_area'
45
44
  end
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module InlineForms
3
- VERSION = "3.0.46"
3
+ VERSION = "3.0.47"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inline_forms
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.46
4
+ version: 3.0.47
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ace Suares
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-09 00:00:00.000000000 Z
11
+ date: 2015-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rvm