Skip to content

Commit 5f66984

Browse files
committed
Changes my pages to keep ascending or descending order
1 parent 1c9ddbd commit 5f66984

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

app/views/movies/edit.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
<br>
88

99
<div>
10-
<%= link_to "Show this movie", @movie %> |
11-
<%= link_to "Back to movies", movies_path %>
10+
<%= link_to "Show this movie", movie_path(@movie, request.query_parameters) %> |
11+
<%= link_to "Back to movies", movies_path(request.query_parameters) %>
1212
</div>

app/views/movies/index.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
<td><%= movie.rating %></td>
2424
<td><%= movie.release_date%></td>
2525
<td>
26-
<%= link_to "Show", movie %> |
27-
<%= link_to "Edit", edit_movie_path(movie) %> |
26+
<%= link_to "Show", movie_path(movie, request.query_parameters) %> |
27+
<%= link_to "Edit", edit_movie_path(movie, request.query_parameters) %> |
2828
<%= link_to "Delete", movie, method: :delete, data: { confirm: "Are you sure?" } %>
2929
</td>
3030
</tr>

app/views/movies/show.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<%= render @movie %>
44

55
<div>
6-
<%= link_to "Edit this movie", edit_movie_path(@movie) %> |
7-
<%= link_to "Back to movies", movies_path %>
6+
<%= link_to "Edit this movie", edit_movie_path(@movie, request.query_parameters) %> |
7+
<%= link_to "Back to movies", movies_path(request.query_parameters) %>
88

99
<%= button_to "Destroy this movie", @movie, method: :delete %>
1010
</div>

0 commit comments

Comments
 (0)