Skip to content

Commit

Permalink
Modified SugarCRM::Module#to_s to return the klass name instead of th…
Browse files Browse the repository at this point in the history
…e SugarCRM module name, per issue chicks#66.
  • Loading branch information
chicks committed Sep 24, 2011
1 parent 1e83c21 commit ac32fd1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/sugarcrm/base.rb
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion lib/sugarcrm/module.rb
Expand Up @@ -122,7 +122,7 @@ def registered?
end

def to_s
@name
@klass
end

def to_class
Expand Down

0 comments on commit ac32fd1

Please sign in to comment.