diff --git a/wesweb01/crud-music-2020/views/albums/edit.slim b/wesweb01/crud-music-2020/views/albums/edit.slim new file mode 100644 index 0000000..8bdf4b8 --- /dev/null +++ b/wesweb01/crud-music-2020/views/albums/edit.slim @@ -0,0 +1,4 @@ +form action="/albums/#{album['AlbumId']}/update" method="post" + input type="text" name="new_title" value="#{album['Title']}" placeholder="Album title" + input type="number" name="new_artistid" value="#{album['ArtistId']}" placeholder="Artist ID" + input type="submit" value="Update" diff --git a/wesweb01/crud-music-2020/views/albums/index.slim b/wesweb01/crud-music-2020/views/albums/index.slim index 9633862..fe27e72 100644 --- a/wesweb01/crud-music-2020/views/albums/index.slim +++ b/wesweb01/crud-music-2020/views/albums/index.slim @@ -5,8 +5,10 @@ ol - albums.each do |album| li a href="albums/#{album['AlbumId']}" #{album["Title"]} + a href="albums/#{album['AlbumId']}/edit" Edit form action="albums/#{album['AlbumId']}/delete" method="post" input type="submit" value="Remove" +