Permalink
Browse files

fix bug where 1.8.7 symbols dont have length method defined on them

  • Loading branch information...
JoshCheek committed Oct 26, 2010
1 parent ae8a171 commit 83d36f47711ac65a8d911632ede11039d3014747
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord-settings/setting.rb
@@ -67,7 +67,7 @@ def validate_name(name)
def self.validate_name(name)
raise InvalidName.new("#{name.inspect} is not a String or Symbol.") unless name.kind_of?(String) || name.kind_of?(Symbol)
- raise InvalidName.new("#{name} is too long, cannot be more than #{MAX_NAME} characters.") if name.length > MAX_NAME
+ raise InvalidName.new("#{name} is too long, cannot be more than #{MAX_NAME} characters.") if name.to_s.length > MAX_NAME
end
end

0 comments on commit 83d36f4

Please sign in to comment.