search for: accountsubclass

Displaying 1 result from an estimated 1 matches for "accountsubclass".

2006 Feb 02
0
proposed bugfix/patch: ActiveRecord cross-module associations
...b (revision 4379) +++ vendor/rails/activerecord/lib/active_record/base.rb (working copy) @@ -922,6 +922,7 @@ # Returns the name of the type of the record using the current module as a prefix. So descendents of # MyApp::Business::Account would appear as "MyApp::Business::AccountSubclass". def type_name_with_module(type_name) + return type_name.sub(/^::/,'''') if type_name =~ /^::/ self.name =~ /::/ ? self.name.scan(/(.*)::/).first.first + "::" + type_name : type_name end