johnsbrn-classy-inheritance 0.6.8.1 → 0.6.8.2

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.
@@ -1,3 +1,5 @@
1
+ == 0.6.8.2 2009-03-19
2
+ * have fixed problems with class_name ending with ss
1
3
  == 0.6.8.1 2009-03-19
2
4
  * Update for Rails 2.3 - johnsbrn
3
5
  == 0.6.8 2009-02-03
@@ -65,7 +65,7 @@ end
65
65
 
66
66
  module Stonean
67
67
  module ClassyInheritance
68
- VERSION = '0.6.8.1'
68
+ VERSION = '0.6.8.2'
69
69
 
70
70
  def self.version
71
71
  VERSION
@@ -136,7 +136,7 @@ module Stonean
136
136
  define_find_with_method(model_sym)
137
137
 
138
138
  if options[:as]
139
- define_can_be_method_on_requisite_class(options[:class_name] || model_sym, options[:as])
139
+ define_can_be_method_on_requisite_class(options[:class_name] || model_sym.to_s.classify, options[:as])
140
140
  end
141
141
 
142
142
  options[:attrs].each{|attr| define_accessors(model_sym, attr, options)}
@@ -263,7 +263,7 @@ module Stonean
263
263
  end
264
264
 
265
265
  def define_can_be_method_on_requisite_class(model_sym, polymorphic_name)
266
- klass = model_sym.to_s.classify
266
+ klass = model_sym.to_s
267
267
  requisite_klass = eval(klass)
268
268
  unless requisite_klass.respond_to?(self.name.underscore.to_sym)
269
269
  requisite_klass.send :can_be, self.name.underscore,
@@ -0,0 +1,10 @@
1
+ require File.dirname(__FILE__) + '/test_helper.rb'
2
+
3
+ class TestWithClassNameEndingWithSS < Test::Unit::TestCase
4
+ def test_should_be_able_to_set_class_names_ending_with_ss
5
+ assert_nothing_raised do
6
+ User.depends_on :address, :as => :owner, :attrs => [:city], :class_name => "Address"
7
+ end
8
+ end
9
+ end
10
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: johnsbrn-classy-inheritance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.8.1
4
+ version: 0.6.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Stone
@@ -46,6 +46,7 @@ files:
46
46
  - test/test_with_prefix_postfix.rb
47
47
  - test/test_with_standard_attributes.rb
48
48
  - test/test_has_dependency.rb
49
+ - test/test_with_class_name_ending_with_ss.rb
49
50
  has_rdoc: true
50
51
  homepage: http://stonean.com/wiki/classy-inheritance
51
52
  post_install_message:
@@ -78,6 +79,7 @@ test_files:
78
79
  - test/test_has_dependency.rb
79
80
  - test/test_helper.rb
80
81
  - test/test_polymorphic_associations.rb
82
+ - test/test_with_class_name_ending_with_ss.rb
81
83
  - test/test_with_optional_dependency.rb
82
84
  - test/test_with_prefix_postfix.rb
83
85
  - test/test_with_standard_attributes.rb