Add movies page

This commit is contained in:
2023-05-02 20:29:09 +10:00
parent 9e1bf6e6d8
commit 0746d29543
12 changed files with 1063 additions and 15 deletions

15
app/repos/movie_repo.rb Normal file
View File

@@ -0,0 +1,15 @@
module Adamantium
module Repos
class MovieRepo < Adamantium::Repo[:movies]
commands :create
def listing
movies.order(Sequel.lit("year desc")).to_a
end
def by_title_and_year(title:, year:)
movies.where(title: title, year: year).one
end
end
end
end