Open main menu
Home
Random
Log in
Settings
About Sugar Labs
Disclaimers
Sugar Labs
Search
Changes
← Older edit
Newer edit →
Service/git
(view source)
Revision as of 12:59, 10 November 2010
3 bytes added
,
12:59, 10 November 2010
→Database tweaks
Line 43:
Line 43:
# search of particular object by its attributes
# search of particular object by its attributes
user = User.find_by_login("user")
user = User.find_by_login("user")
−
project =
User
.find_by_title("project")
+
project =
Project
.find_by_title("project")
# change object attributes
# change object attributes
−
project.owner = User.find_by_email("foo@
bas
")
+
project.owner = User.find_by_email("foo@
bar
")
project.save!
project.save!
Alsroot
Bots
,
Bureaucrats
,
Check users
,
Administrators
,
Widget editors
5,705
edits