inline_forms 1.6.32 → 1.6.33

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b5dadaa5660d48f321abef68b8aa72b22248ce15
4
- data.tar.gz: 25e836d94cc608ca8c59544005615f5cd5135694
3
+ metadata.gz: eee4282127f039696f5aea6cf3cb64d091c80ce2
4
+ data.tar.gz: c6e6ccd9c1e4636215e26a4e028ba30ecdcaa5fa
5
5
  SHA512:
6
- metadata.gz: 637176e55cc322a9e4fb5287d5a658eba651317b0edb2b13d2aa38c739f548c359d49dcef53f247fa00a66e968b424f56e838cdd89234bbdc72f709c6c9d6075
7
- data.tar.gz: 8a29b0c498641720f7b2230bc83da949675d5e2c80fcb13cb281726ddaa4754b419201bbeaeea545902d9613e7c025214f7a08a562c6102e593605e1b9a6cf27
6
+ metadata.gz: 11cba6088a4c6c2b1df9afc9617fb210522252812a381b286c2320f22be530b1b1559132cff2efa605cc7d23900c476ca604e2813f8e6ba566be21ee7615aef0
7
+ data.tar.gz: 668c48a90618240e9d76c74b36f1bc3ea12e7c5a37fb07f92224c7042afced68d3aa5cd769f6af5d0e7ed0e240d45c914f2749b5dc3691c8955e951e06662a58
@@ -39,9 +39,8 @@ they are @object. We need this magic here to rewrite all the @variables to varia
39
39
  <% update_span = "#{parent_class.to_s.underscore}_#{parent_id}_#{attribute}_list" -%>
40
40
  <% path_to_new='new_' + attribute.to_s.singularize + '_path' %>
41
41
  <% foreign_key = parent_class.reflect_on_association(attribute.to_sym).options[:foreign_key] || parent_class.name.foreign_key -%>
42
-
43
- <% conditions = [ "#{foreign_key} = ?", parent_id ] %>
44
42
  <% model = attribute.to_s.singularize.camelcase.constantize %>
43
+ <% conditions = [ "#{model.table_name}.#{foreign_key} = ?", parent_id ] %>
45
44
  <% objects = parent_class.find(parent_id).send(attribute) %>
46
45
  <% objects = parent_class.find(parent_id).send(attribute).accessible_by(current_ability) if cancan_enabled? %>
47
46
  <% objects = objects.order(attribute.to_s.singularize.camelcase.constantize.order_by_clause) if attribute.to_s.singularize.camelcase.constantize.respond_to?(:order_by_clause) && ! attribute.to_s.singularize.camelcase.constantize.order_by_clause.nil? %>
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module InlineForms
3
- VERSION = "1.6.32"
3
+ VERSION = "1.6.33"
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.32
4
+ version: 1.6.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ace Suares
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2013-07-09 00:00:00 Z
12
+ date: 2013-07-11 00:00:00 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rvm