- Change the years displayed in the movie_release_date field:
In the file app/views/movie_reviews/_form.html.erb, line 23,
replace the line
<%= f.date_select :movie_release_date %>
by
<%= f.date_select :movie_release_date,
:start_year => 1996, :end_year => 2006 %>
- Add the following validations:
Add these lines of code to the file
app/models/movie_reviews.rb:
validates_presence_of :reviewer
validates_numericality_of :rating,
:greater_than_or_equal_to 0.0,
:less_than_or_equal_to 5.0
- Add a heading to the show view: Add the following header
to the file app/views/movie_reviews/show.html.erb:
<h1>Movie Review Information</h1>
- Change the heading on the index view: Change this code
in the file app/views/movie_reviews/index.html.erb:
<h1>Listing movie_reviews>
to
<h1>Movie Review Listings</h2>
- Change the table headings on the index view:
Change the table headings in the th tags to be more descriptive and
user friendly.
- Change the labels on the form:
Change the labels in the form file app/views/movie_reviews/_form.html.erb
to make them more user friendly. For example, in line 15, change the
line
<%= f.text_field :reviewer %>
to
<%= Reviewer Name %>