piggybak_variants 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,8 +3,8 @@ module PiggybakVariants
3
3
  self.table_name = "options"
4
4
 
5
5
  attr_accessible :name, :position
6
- has_many :option_values
7
- has_many :option_configurations
6
+ has_many :option_values, :dependent => :destroy
7
+ has_many :option_configurations, :dependent => :destroy
8
8
 
9
9
  default_scope :order => "position ASC"
10
10
 
@@ -14,7 +14,14 @@ module PiggybakVariants
14
14
  initializer "piggybak_variants.precompile_hook" do |app|
15
15
  app.config.assets.precompile += ['piggybak_variants/piggybak_variants.js']
16
16
  end
17
-
17
+
18
+ # TODO: Figure out of we can have this only in to_prepare or here
19
+ initializer "piggybak_variants.add_helper" do |app|
20
+ ApplicationController.class_eval do
21
+ helper :piggybak_variants
22
+ end
23
+ end
24
+
18
25
  initializer "piggybak.rails_admin_config" do |app|
19
26
  RailsAdmin.config do |config|
20
27
  config.model PiggybakVariants::OptionConfiguration do
@@ -1,3 +1,3 @@
1
1
  module PiggybakVariants
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
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.1
4
+ version: 0.0.2
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-10-24 00:00:00.000000000 Z
12
+ date: 2012-10-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -102,7 +102,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
102
102
  version: '0'
103
103
  segments:
104
104
  - 0
105
- hash: 3200390397897973763
105
+ hash: 2431533342366565079
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: 3200390397897973763
114
+ hash: 2431533342366565079
115
115
  requirements: []
116
116
  rubyforge_project:
117
117
  rubygems_version: 1.8.23