&pgid;

**railsÊÙ¶¯²ñ°ìÍ÷ [#dd041670]
#ls2(rails)

**Âè4²óÊÙ¶¯²ñ¤Î¥Í¥¿ [#cdc3f5f5]

¥Í¥¿¤â¤È¤Ï²¼µ­¤Ç¤¹¡£

Active Record Reference Documentation
http://rubyonrails.org/api/classes/ActiveRecord/Base.html

**Æü»þ [#g4f8ac7b]
- 2006/08/11(¶â) 18:00¤¯¤é¤¤ ¡Á

**»²²Ã¼Ô [#u5cc1f6d]
-[[»ÖÅÄ]](ȯɽ¼Ô) ([[¥¢¡¼¥¯¥¦¥§¥Ö:http://www.ark-web.jp]])
-[[Ãݼ]]¤µ¤ó ([[¥¢¡¼¥¯¥¦¥§¥Ö:http://www.ark-web.jp]])
-[[¿ÊÃÏ]]¤µ¤ó ([[¥¢¡¼¥¯¥¦¥§¥Ö:http://www.ark-web.jp]])

** À¸À® [#b2cab7cf]
+¥Ï¥Ã¥·¥å¤Ç¡£
  user = User.new(:name => "David", :occupation => "Code Artist")
  user.name # => "David"
+block¤Ç¡£
  user = User.new do |u|
    u.name = "David"
    u.occupation = "Code Artist"
  end
+¶õ¤Î¥ª¥Ö¥¸¥§¥¯¥È¤ò¤Ä¤¯¤Ã¤Æ¡£¸å¤«¤é°À­¤ÎÀßÄê¡£
  user = User.new
  user.name = "David"
  user.occupation = "Code Artist"

** Êݸ [#q5539a36]
-save¤Þ¤¿¤Ï¡¢save!¥á¥½¥Ã¥É¤Ç¡£
http://rubyonrails.org/api/classes/ActiveRecord/Base.html#M000905
--No record exists: Creates a new record with values matching those of the object attributes.
--A record does exist: Updates the record with values matching those of the object attributes.
-save!¤Ï
 it raises a RecordNotSaved exception

** ¸¡º÷ [#y1199cdc]
-

¥È¥Ã¥×   ¿·µ¬ °ìÍ÷ ñ¸ì¸¡º÷ ºÇ½ª¹¹¿·   ¥Ø¥ë¥×   ºÇ½ª¹¹¿·¤ÎRSS

¥¢¡¼¥¯¥¦¥§¥Ö¤Î¥µ¡¼¥Ó¥¹¤ä¥½¥ê¥å¡¼¥·¥ç¥ó¤Ï¤³¤Á¤é