|
||||||||||||||||||||||||||||
Project
R1 - Simple
|
id | Primary key for this user. | automatically created |
first_name | First name of the user. | string. |
last_name | Last name of the user. | string |
RubyMine: Tools-> Run Rails Generator -> model >>> give it the name User Command Line: rails generate model user
Edit the migration file and fill in the body of the change method as described in class materials
id | Primary key for this photo. |
user_id | Identifier for the user who created the photo. |
date_time | The date and time when the photo was added to the database. (type :date) |
file_name | Name of a file containing the actual photo (in the directory project4/app/assets/images). |
has_many: XXX AND belongs_to: XXX
class User < ActiveRecord::Base
has_many :photos
has_many :comments
end
COMMAND LINE: rails generate migration load_data RubyMine IDE: Tools-> Run Rails Generator -> migration (then give the name load_data)
COMMAND LINE: rake db:migrate RubyMine IDE: Tools->Run Rake Task -> db:migrate
Create controllers and views that implement two URLs.
When this URL is referenced your application must return a Web page that displays a list of all users in the database. The user names must be links: clicking on a user name displays the photos for that user, as described below.
OUTPUT (if you did above correct)
The second URL supported by your application has the form /photos/index/id, where id is the database identifier for a particular user. When this URL is referenced your application must return a web page displaying all of the photos belonging to that user. For each photo you must display the photo itself, the creation time for the photo, and all of the comments for that photo. For each comment you must display the time when the comment was created, the name of the user who created the comment, and the text of the comment. The creator for each __comment should be a link that can be clicked to switch to the photos page for that user.
Although you don't need to spend a lot of time on the appearance of the pages you generate, they should be neat and understandable. They should have meaningful titles, and the information layout should be clean (e.g., it should be clear which photo each comment applies to). Use the personalized layout you created for the last project.
You will also be providing a YouTube Demonstration of this application that you are running locally on your machine. You should video it using any digital recording device (like your phone) showing your screen shots that you can upload to YouTube as a video. It should include the following in the video:
YOU TUBE video content.
1) Introduction: Showing a page (you can video a typed up page you display on your computer) including:
2) Run your app, go over each functionality of your app and fully demonstrate it (both URLs you had to implement)
3) If you had and problems that didn't work, show them (the results if any) and discuss why you think it didn't work
4) Discuss what you learned from making this app- what were the challenges, what you learned, how you can help others.
You will create a posting to BB->Projects->Project R1. You must have the following sections on your word document you attach to your submission
AND YOU must also attach your Code.zip file containing directory of your RoR app
:
Section Heading Contents you should have 1) Intro and Purpose
Evaluation: 0 to 10 points
- Name your Application
- URL to YouTube Video
2) Demonstration of Application working
Evaluation: 0 to 10 points
- SHOW A SEPERATE SCREEN SHOT FOR each new screen a user sees in using your application.
3) Discussion of anything NOT working Evaluation: 0 to 10 points
- You must show and discuss how the app is not working.
- If you did not implment all of it you must state what YOU HAVE NOT implemented
30 points for Documentation
- 30 points if did not turn in Code and I have to ask for it (I can not evaluate without this)
50 points for YouTube demonstration
20 points for live demonstration
100 points for application