piggybak_variants 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,10 @@
1
1
  :ruby
2
2
  column_type_dom_id = form.dom_id(field).sub(field.method_name.to_s, "")
3
- attr = column_type_dom_id.gsub("frame_variants_attributes", '').gsub(/^_/, '[').gsub(/_$/, ']')
4
-
5
- = #TODO: Add JavaScript to limit selectors here
3
+ attr = column_type_dom_id.gsub(/[a-z]+_variants_attributes/, '').gsub(/^_/, '[').gsub(/_$/, ']')
6
4
 
7
5
  - options_for_klass(@object.class).each do |option|
8
6
  %h5= option.name
9
7
  - option.option_values.each do |option_value|
10
8
  %p
11
- = check_box_tag "frame[variants_attributes]#{attr}[option_value_ids][]", option_value.id, form.object.option_values.include?(option_value), :style => "margin:-2px 5px 0px 0px;"
9
+ = check_box_tag "#{@object.class.to_s.downcase}[variants_attributes]#{attr}[option_value_ids][]", option_value.id, form.object.option_values.include?(option_value), :style => "margin:-2px 5px 0px 0px;"
12
10
  %span= option_value.name
@@ -1,3 +1,3 @@
1
1
  module PiggybakVariants
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: piggybak_variants
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -102,7 +102,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
102
102
  version: '0'
103
103
  segments:
104
104
  - 0
105
- hash: 2607833046571697989
105
+ hash: -1851012769668086363
106
106
  required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  none: false
108
108
  requirements:
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  version: '0'
112
112
  segments:
113
113
  - 0
114
- hash: 2607833046571697989
114
+ hash: -1851012769668086363
115
115
  requirements: []
116
116
  rubyforge_project:
117
117
  rubygems_version: 1.8.23