diff --git a/lib/sugarcrm/base.rb b/lib/sugarcrm/base.rb index f9eafeb..4e85ab4 100644 --- a/lib/sugarcrm/base.rb +++ b/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: diff --git a/lib/sugarcrm/module.rb b/lib/sugarcrm/module.rb index 3efcf8d..3e2faa5 100644 --- a/lib/sugarcrm/module.rb +++ b/lib/sugarcrm/module.rb @@ -122,7 +122,7 @@ def registered? end def to_s - @name + @klass end def to_class