sugarcrm 0.7.8 → 0.7.9
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +19 -6
- data/VERSION +1 -1
- data/lib/sugarcrm/base.rb +3 -1
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -33,14 +33,27 @@ e.g. +SugarCRM::Contacts.find_by_title("VP of Sales")+ will work, but +SugarCRM:
|
|
33
33
|
# Get the logged in user
|
34
34
|
SugarCRM.current_user
|
35
35
|
|
36
|
-
# Retrieve a user by user_name
|
37
|
-
SugarCRM::User.find_by_user_name("admin")
|
38
|
-
|
39
|
-
# Retrieve all Accounts owned by a particular user.
|
40
|
-
SugarCRM::User.find_by_user_name('sarah').accounts
|
41
|
-
|
42
36
|
# Show a list of available modules
|
43
37
|
SugarCRM.modules
|
38
|
+
|
39
|
+
# Retrieve a User by user_name
|
40
|
+
SugarCRM::User.find_by_user_name("admin")
|
41
|
+
|
42
|
+
# Retrieve all Contacts assigned to a particular user.
|
43
|
+
SugarCRM::User.find_by_user_name('sarah').contacts
|
44
|
+
|
45
|
+
# Retrieve all email addresses on an Account
|
46
|
+
SugarCRM::Account.find_by_name("JAB Funds Ltd.").contacts.each do |contact|
|
47
|
+
contact.email_addresses.each do |email|
|
48
|
+
puts "#{email.email_address}" unless email.opt_out == "1"
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
# Look up the fields for a given module
|
53
|
+
SugarCRM::Module.find("Accounts").fields
|
54
|
+
|
55
|
+
# Look up the relationships for a given module
|
56
|
+
SugarCRM::Module.find("Accounts").link_fields
|
44
57
|
|
45
58
|
# Use the HTTP Connection and SugarCRM API to load the Admin user
|
46
59
|
SugarCRM.connection.get_entry("Users", 1)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.9
|
data/lib/sugarcrm/base.rb
CHANGED
@@ -21,6 +21,7 @@ module SugarCRM; class Base
|
|
21
21
|
|
22
22
|
# Contains a list of attributes
|
23
23
|
attr :attributes, true
|
24
|
+
attr :associations, true
|
24
25
|
attr :id, true
|
25
26
|
attr :debug, true
|
26
27
|
|
@@ -60,7 +61,8 @@ module SugarCRM; class Base
|
|
60
61
|
private
|
61
62
|
|
62
63
|
def find_initial(options)
|
63
|
-
|
64
|
+
# TODO: Look into fixing this to actually work
|
65
|
+
#options.update(:max_results => 1)
|
64
66
|
find_every(options)
|
65
67
|
end
|
66
68
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sugarcrm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 0.7.
|
9
|
+
- 9
|
10
|
+
version: 0.7.9
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Carl Hicks
|