wakari 0.0.2 → 0.0.3

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.
@@ -9,7 +9,7 @@ module Wakari
9
9
  module ClassMethods
10
10
 
11
11
  def acts_as_content_class(translation_class, association_name, options)
12
- has_many association_name, :class_name => translation_class.name, :inverse_of => :content, :order => :position, :autosave => true, :foreign_key => :content_id
12
+ has_many association_name, :class_name => "::Object::#{translation_class.name}", :inverse_of => :content, :order => :position, :autosave => true, :foreign_key => :content_id
13
13
  default_scope { includes(association_name) }
14
14
  end
15
15
 
@@ -9,7 +9,7 @@ module Wakari
9
9
 
10
10
  module ClassMethods
11
11
  def acts_as_meta_class(translation_class, full_association_name, options)
12
- has_many full_association_name, :class_name => translation_class.name, :inverse_of => :meta, :order => :created_at, :foreign_key => :meta_id
12
+ has_many full_association_name, :class_name => "::Object::#{translation_class.name}", :inverse_of => :meta, :order => :created_at, :foreign_key => :meta_id
13
13
  end
14
14
  end
15
15
 
@@ -39,8 +39,8 @@ module Wakari
39
39
  def acts_as_translation_class(content_class, association_name, meta_class, full_association_name, options)
40
40
  has_locale! *Array.wrap(options[:locales])#, :accessible => false
41
41
 
42
- belongs_to :content, :class_name => content_class.name, :inverse_of => association_name, :counter_cache => :"#{association_name}_count"
43
- belongs_to :meta, :class_name => meta_class.name, :inverse_of => full_association_name, :counter_cache => :wakari_used
42
+ belongs_to :content, :class_name => "::Object::#{content_class.name}", :inverse_of => association_name, :counter_cache => :"#{association_name}_count"
43
+ belongs_to :meta, :class_name => "::Object::#{meta_class.name}", :inverse_of => full_association_name, :counter_cache => :wakari_used
44
44
 
45
45
  self._meta_attributes =
46
46
  if meta_class < Wakari::Meta::Text || meta_class < Wakari::Meta::String
@@ -1,3 +1,3 @@
1
1
  module Wakari
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wakari
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
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-12-31 00:00:00.000000000 Z
12
+ date: 2013-01-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gaigo