Browse files

Modified SugarCRM::Module#to_s to return the klass name instead of th…

…e SugarCRM module name, per issue #66.
  • Loading branch information...
1 parent 1e83c21 commit ac32fd13cbb467a23cbe10567606f4773e1f1e1b @chicks chicks committed Sep 23, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/sugarcrm/base.rb
  2. +1 −1 lib/sugarcrm/module.rb
View
2 lib/sugarcrm/base.rb
@@ -238,7 +238,7 @@ def update_attributes(attributes)
# Returns the URL (in string format) where the module instance is available in CRM
def url
- "#{SugarCRM.session.config[:base_url]}/index.php?module=#{self.class._module}&action=DetailView&record=#{self.id}"
+ "#{SugarCRM.session.config[:base_url]}/index.php?module=#{self.class._module.name}&action=DetailView&record=#{self.id}"
end
# Delegates to id in order to allow two records of the same type and id to work with something like:
View
2 lib/sugarcrm/module.rb
@@ -122,7 +122,7 @@ def registered?
end
def to_s
- @name
+ @klass
end
def to_class

0 comments on commit ac32fd1

Please sign in to comment.