<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="th">
	<id>http://158.108.32.49/wiki/index.php?action=history&amp;feed=atom&amp;title=418342_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%9B%E0%B8%A5%E0%B8%B2%E0%B8%A2_2553%2F%E0%B8%9B%E0%B8%8F%E0%B8%B4%E0%B8%9A%E0%B8%B1%E0%B8%95%E0%B8%B4%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%97%E0%B8%B5%E0%B9%88_5</id>
	<title>418342 ภาคปลาย 2553/ปฏิบัติการที่ 5 - ประวัติรุ่นแก้ไข</title>
	<link rel="self" type="application/atom+xml" href="http://158.108.32.49/wiki/index.php?action=history&amp;feed=atom&amp;title=418342_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%9B%E0%B8%A5%E0%B8%B2%E0%B8%A2_2553%2F%E0%B8%9B%E0%B8%8F%E0%B8%B4%E0%B8%9A%E0%B8%B1%E0%B8%95%E0%B8%B4%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%97%E0%B8%B5%E0%B9%88_5"/>
	<link rel="alternate" type="text/html" href="http://158.108.32.49/wiki/index.php?title=418342_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%9B%E0%B8%A5%E0%B8%B2%E0%B8%A2_2553/%E0%B8%9B%E0%B8%8F%E0%B8%B4%E0%B8%9A%E0%B8%B1%E0%B8%95%E0%B8%B4%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%97%E0%B8%B5%E0%B9%88_5&amp;action=history"/>
	<updated>2026-05-06T23:24:08Z</updated>
	<subtitle>ประวัติรุ่นแก้ไขของหน้านี้ในวิกิ</subtitle>
	<generator>MediaWiki 1.33.1</generator>
	<entry>
		<id>http://158.108.32.49/wiki/index.php?title=418342_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%9B%E0%B8%A5%E0%B8%B2%E0%B8%A2_2553/%E0%B8%9B%E0%B8%8F%E0%B8%B4%E0%B8%9A%E0%B8%B1%E0%B8%95%E0%B8%B4%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%97%E0%B8%B5%E0%B9%88_5&amp;diff=10300&amp;oldid=prev</id>
		<title>Cardcaptor: /* สร้าง Rails Application และ Model */</title>
		<link rel="alternate" type="text/html" href="http://158.108.32.49/wiki/index.php?title=418342_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%9B%E0%B8%A5%E0%B8%B2%E0%B8%A2_2553/%E0%B8%9B%E0%B8%8F%E0%B8%B4%E0%B8%9A%E0%B8%B1%E0%B8%95%E0%B8%B4%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%97%E0%B8%B5%E0%B9%88_5&amp;diff=10300&amp;oldid=prev"/>
		<updated>2010-11-30T07:59:32Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;สร้าง Rails Application และ Model&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;th&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;←รุ่นแก้ไขก่อนหน้า&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;รุ่นแก้ไขเมื่อ 07:59, 30 พฤศจิกายน 2553&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l48&quot; &gt;แถว 48:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;แถว 48:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;เพื่อความสะดวก เราได้เตรียมฐานข้อมูลที่มีข้อมูลนักดนตรีเอาไว้ให้คุณแล้ว ให้คุณดาวน์โหลดไฟล์ [http://theory.cpe.ku.ac.th/~pramook/418342/lab-05/development.sqlite3 development.sqlite3] แล้วนำมันไปแทนที่ไฟล์ development.sqlite3 ที่ rails สร้างไว้ในไดเรคทอรี db&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;เพื่อความสะดวก เราได้เตรียมฐานข้อมูลที่มีข้อมูลนักดนตรีเอาไว้ให้คุณแล้ว ให้คุณดาวน์โหลดไฟล์ [http://theory.cpe.ku.ac.th/~pramook/418342/lab-05/development.sqlite3 development.sqlite3] แล้วนำมันไปแทนที่ไฟล์ development.sqlite3 ที่ rails สร้างไว้ในไดเรคทอรี db&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;หมายเหตุ:&amp;#039;&amp;#039;&amp;#039; ไฟล์ development.sqlite3 นี้สร้างขึ้นมาจากข้อมูลนักดนตรีของ [http://www.freebase.com http://www.freebase.com] (คุณสามารถดาวน์โหลดไฟล์์ต้นฉบับได้จาก [http://download.freebase.com/datadumps/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;2009&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;10&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;01&lt;/del&gt;/browse/music/ http://download.freebase.com/datadumps/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;2009&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;10&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;01&lt;/del&gt;/browse/music/] โดยเอาไฟล์ชื่อ artist.tsv)&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;หมายเหตุ:&amp;#039;&amp;#039;&amp;#039; ไฟล์ development.sqlite3 นี้สร้างขึ้นมาจากข้อมูลนักดนตรีของ [http://www.freebase.com http://www.freebase.com] (คุณสามารถดาวน์โหลดไฟล์์ต้นฉบับได้จาก [http://download.freebase.com/datadumps/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;2010&lt;/ins&gt;-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;11&lt;/ins&gt;-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;18&lt;/ins&gt;/browse/music/ http://download.freebase.com/datadumps/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;2010&lt;/ins&gt;-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;11&lt;/ins&gt;-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;18&lt;/ins&gt;/browse/music/] โดยเอาไฟล์ชื่อ artist.tsv)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== เขียนหน้าเว็บสำหรับแสดงผลศิลปินแต่ละคน ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== เขียนหน้าเว็บสำหรับแสดงผลศิลปินแต่ละคน ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Cardcaptor</name></author>
		
	</entry>
	<entry>
		<id>http://158.108.32.49/wiki/index.php?title=418342_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%9B%E0%B8%A5%E0%B8%B2%E0%B8%A2_2553/%E0%B8%9B%E0%B8%8F%E0%B8%B4%E0%B8%9A%E0%B8%B1%E0%B8%95%E0%B8%B4%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%97%E0%B8%B5%E0%B9%88_5&amp;diff=10299&amp;oldid=prev</id>
		<title>Cardcaptor: /* สร้าง Rails Application และ Model */</title>
		<link rel="alternate" type="text/html" href="http://158.108.32.49/wiki/index.php?title=418342_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%9B%E0%B8%A5%E0%B8%B2%E0%B8%A2_2553/%E0%B8%9B%E0%B8%8F%E0%B8%B4%E0%B8%9A%E0%B8%B1%E0%B8%95%E0%B8%B4%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%97%E0%B8%B5%E0%B9%88_5&amp;diff=10299&amp;oldid=prev"/>
		<updated>2010-11-30T07:52:34Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;สร้าง Rails Application และ Model&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;th&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;←รุ่นแก้ไขก่อนหน้า&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;รุ่นแก้ไขเมื่อ 07:52, 30 พฤศจิกายน 2553&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l5&quot; &gt;แถว 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;แถว 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;หลังจากนั้นเราจะสร้าง model ชื่อ artist ด้วยการสั่ง&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;หลังจากนั้นเราจะสร้าง model ชื่อ artist ด้วยการสั่ง&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;ruby script/&lt;/del&gt;generate model artist&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;rails &lt;/ins&gt;generate model artist&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;แล้วจงไปแก้ไขไฟล์ migration ที่ชื่อ db/migrate/&amp;lt;&amp;lt;timestamp&amp;gt;&amp;gt;_create_artists.rb เพื่อให้ในตารางมีฟีลด์ดังต่อไปนี้&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;แล้วจงไปแก้ไขไฟล์ migration ที่ชื่อ db/migrate/&amp;lt;&amp;lt;timestamp&amp;gt;&amp;gt;_create_artists.rb เพื่อให้ในตารางมีฟีลด์ดังต่อไปนี้&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Cardcaptor</name></author>
		
	</entry>
	<entry>
		<id>http://158.108.32.49/wiki/index.php?title=418342_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%9B%E0%B8%A5%E0%B8%B2%E0%B8%A2_2553/%E0%B8%9B%E0%B8%8F%E0%B8%B4%E0%B8%9A%E0%B8%B1%E0%B8%95%E0%B8%B4%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%97%E0%B8%B5%E0%B9%88_5&amp;diff=10298&amp;oldid=prev</id>
		<title>Cardcaptor: หน้าที่ถูกสร้างด้วย &#039;ในปฏิบัติการนี้ เราจะสร้าง model, controller, และ view อย่างง่าย…&#039;</title>
		<link rel="alternate" type="text/html" href="http://158.108.32.49/wiki/index.php?title=418342_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%9B%E0%B8%A5%E0%B8%B2%E0%B8%A2_2553/%E0%B8%9B%E0%B8%8F%E0%B8%B4%E0%B8%9A%E0%B8%B1%E0%B8%95%E0%B8%B4%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%97%E0%B8%B5%E0%B9%88_5&amp;diff=10298&amp;oldid=prev"/>
		<updated>2010-11-30T07:52:17Z</updated>

		<summary type="html">&lt;p&gt;หน้าที่ถูกสร้างด้วย &amp;#039;ในปฏิบัติการนี้ เราจะสร้าง model, controller, และ view อย่างง่าย…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;หน้าใหม่&lt;/b&gt;&lt;/p&gt;&lt;div&gt;ในปฏิบัติการนี้ เราจะสร้าง model, controller, และ view อย่างง่ายๆ สำหรับค้นหาข้อมูลในฐานข้อมูลของนักดนตรีสากล&lt;br /&gt;
&lt;br /&gt;
== สร้าง Rails Application และ Model ==&lt;br /&gt;
ให้คุณสร้าง rails application ชื่อ music ขึ้นมาใน directory หนึ่ง&lt;br /&gt;
&lt;br /&gt;
หลังจากนั้นเราจะสร้าง model ชื่อ artist ด้วยการสั่ง&lt;br /&gt;
 ruby script/generate model artist&lt;br /&gt;
แล้วจงไปแก้ไขไฟล์ migration ที่ชื่อ db/migrate/&amp;lt;&amp;lt;timestamp&amp;gt;&amp;gt;_create_artists.rb เพื่อให้ในตารางมีฟีลด์ดังต่อไปนี้&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;#039;&amp;#039;&amp;#039;ชื่อ&amp;#039;&amp;#039;&amp;#039;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;#039;&amp;#039;&amp;#039;ชนิด&amp;#039;&amp;#039;&amp;#039;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;name&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;string&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;origin&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;string&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;genre&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;string&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;label&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;string&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;homepage&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;string&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;album&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;text&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;track&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;text&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
หลังจากนั้นให้สั่งให้ migration ทำงานด้วยคำสั่ง&lt;br /&gt;
 rake db:migrate&lt;br /&gt;
&lt;br /&gt;
เพื่อความสะดวก เราได้เตรียมฐานข้อมูลที่มีข้อมูลนักดนตรีเอาไว้ให้คุณแล้ว ให้คุณดาวน์โหลดไฟล์ [http://theory.cpe.ku.ac.th/~pramook/418342/lab-05/development.sqlite3 development.sqlite3] แล้วนำมันไปแทนที่ไฟล์ development.sqlite3 ที่ rails สร้างไว้ในไดเรคทอรี db&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;หมายเหตุ:&amp;#039;&amp;#039;&amp;#039; ไฟล์ development.sqlite3 นี้สร้างขึ้นมาจากข้อมูลนักดนตรีของ [http://www.freebase.com http://www.freebase.com] (คุณสามารถดาวน์โหลดไฟล์์ต้นฉบับได้จาก [http://download.freebase.com/datadumps/2009-10-01/browse/music/ http://download.freebase.com/datadumps/2009-10-01/browse/music/] โดยเอาไฟล์ชื่อ artist.tsv)&lt;br /&gt;
&lt;br /&gt;
== เขียนหน้าเว็บสำหรับแสดงผลศิลปินแต่ละคน ==&lt;br /&gt;
จงสร้าง controller ชื่อ artists&lt;br /&gt;
&lt;br /&gt;
หลังจากนั้นไปแก้ไข ArtistsController ในไฟล์ app/controllers/artists_controller.rb โดยทำการเพิ่ม action ชื่อ show&lt;br /&gt;
&lt;br /&gt;
Action show นี้ เมื่อเราเข้าถึงมันผ่าน url http://localhost:3000/artists/show/&amp;lt;&amp;lt;id ของศิลปิน&amp;gt;&amp;gt; แล้วจะต้องแสดงข้อมูลของศิลปินตาม screenshot ข้างล่างนี้&lt;br /&gt;
&lt;br /&gt;
[[Image:Lab-05-show.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;ข้อสังเกต:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* มีฟีล์ที่เราต้องแสดงผลอยู่ทั้งหมด 7 ฟีลด์ ได้แต่ name, origin, genre, label, homepage, album, และ track แต่ screenshot ข้างบนแสดงให้เห็นถึงแค่ album เท่านั้น เนื่องจากพื้นที่ไม่พอ&lt;br /&gt;
* ฟีลด์ genre, label, homepage, album, และ track นั้นความจริงแล้วเป็นลิสต์ของข้อมูล ในฐานข้อมูลจะเก็บเป็น string และ text ขนาดใหญ่ ซึ่งระหว่างข้อมูลแต่ละตัวจะมี comma (,) ขั้นอยู่ คุณจะต้องเขียนโปรแกรมเพื่อแปลงลิสต์ของข้อมูลในรูปแบบนี้ให้เป็น unordered list (ul ในภาษา HTML)&lt;br /&gt;
&lt;br /&gt;
== เขียนหน้าเว็บสำหรับค้นหาศิลปินตามชื่อ ==&lt;br /&gt;
หลังจากนั้นจะสร้าง action ชื่อ name_search ใน controller artists&lt;br /&gt;
&lt;br /&gt;
หน้าเว็บเพจของ name_search จะอนุญาตให้ผู้ใช้ค้นหาศิลปินโดยป้อนชื่อหรือส่วนหนึ่งของชื่อของศิลปินที่คุณต้องการ โดยมันจะต้องแสดงผลตาม screenshot ข้างล่างนี้&lt;br /&gt;
&lt;br /&gt;
[[Image:Lab-05-name_search.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;ข้อสังเกต&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* ผู้ใช้สามารถป้อนเพียงแค่ส่วนหนึ่งของชื่อก็ได้ เราแนะนำให้เวลาคุณทำการค้นหาด้วยคำสั่ง find จงใช้เครื่องหมาย GLOB ซึ่งอนุญาตให้คุณใส่ชื่อที่ต้องการค้นหาเป็น *abc* โดยที่ * แต่ละตัวแสดงถึงตัวอักษรตัวกี่ตัวก็ได้ เหมือนกับตอนที่คุณใช้ wildcard ใน shell ของระบบปฏิบัติการต่างๆ คุณสามารถดูรายละเอียดของเครื่องหมาย GLOB ได้ที่ [http://www.sqlite.org/lang_expr.html http://www.sqlite.org/lang_expr.html]&lt;br /&gt;
&lt;br /&gt;
* คุณจะต้องพิมพ์จำนวนผลลัพธ์ที่ค้นหาได้ทั้งหมด เสร็จแล้วจึงแสดงผลการค้นหาแค่ 100 ผลแรกเท่านั้น คุณสามารถนับจำนวนผลการค้นหาทั้งหมดโดยใช้คำสั่ง count ซึ่งคุณสามารถดู documentation ของมันได้ที่นี่ [http://api.rubyonrails.org/classes/ActiveRecord/Calculations/ClassMethods.html#M002187 http://api.rubyonrails.org/classes/ActiveRecord/Calculations/ClassMethods.html#M002187]&lt;br /&gt;
&lt;br /&gt;
* ในคอลัมน์แรกของตารางผลลัพธ์ คุณจะต้องสร้าง link ไปยังหน้า show ของศิลปินคนนั้นๆ&lt;br /&gt;
&lt;br /&gt;
คุณสามารถดูตัวอย่างพฤติกรรมของหน้า name_search ได้ที่ http://theory.cpe.ku.ac.th:3000/artists/name_search (แต่ต้องรอให้ผมเปิดมันขึ้นก่อน)&lt;br /&gt;
&lt;br /&gt;
== ทำหน้าค้นหาตามเกณฑ์อื่นๆ ==&lt;br /&gt;
เมื่อทำเสร็จแล้ว ให้ลองทำหน้าเว็บให้ผู้ใช้สามารถค้นหาศิลปินตามเกณฑ์อื่นๆ เช่น อัลบัม แนวเพลง (genre) หรือผลงานเพลง (track)&lt;/div&gt;</summary>
		<author><name>Cardcaptor</name></author>
		
	</entry>
</feed>