Professional Documents
Culture Documents
Prepared by : Badrinath K
12. Build a Rails application to accept book information viz. Accession number, title,
authors, edition and publisher from a web page and store the information in a database
and to search for a book with the title specified by the user and to display the search results
with proper headings.
In windows XP only :
Save InstantRails-2.0-win to C drive and extract it.
Create shortcut on desktop for InstantRails-2.0-win logo
Page 1
Prepared by : Badrinath K
If you click on the Apache/MySQL buttons, you will get a menu enabling you to start/restart
these servers.
To the left of the Apache button, there is another button that has the Instant Rails logo. Clicking
this button reveals a drop-down menu with the following options:
Help
Log Files
Configure
Rails Applications
Restart Servers
Stop Servers and Exit
Page 2
Prepared by : Badrinath K
Page 3
Prepared by : Badrinath K
You can now access your web application by using a browser to visit:
http://localhost:3000/
Page 4
Prepared by : Badrinath K
Page 5
Prepared by : Badrinath K
Page 6
Prepared by : Badrinath K
Page 7
Prepared by : Badrinath K
Page 8
Prepared by : Badrinath K
<td><%=@author%></td>
<td><%=@edition%></td>
<td><%=@publisher%></td>
</tr>
<%end%>
</table>
</form>
</body>
</html>
Welcome.rhtml
<html>
<title>welcome template for books</title>
<body>
<p>total number of books=<%=@num_books %></p>
<form action="result">
enter searching book tittle : <input type="text" name="title"/>
<input type=submit value="search"/>
</form>
</body>
</html>
Save as type : all files
Encoding : utf-8
Page 9
Prepared by : Badrinath K
Page 10