This is a starter Hanami (1.3) project with additional steps and actions.
books
:bookscompleted resource and model- bootstrap layout with css and js assets
- flash messages, dynamic titles, partials
- basic validatations
- all tests for books
- navbar with auth stubs
users
:usersresource (index, new, create actions) and model- association
has_manyandbelongs_to - tests for associations and users
- now books relate to users
main
- custom
current_pathhelper
You can find examples of creating users or books in the db/seed.rb file.
Setup (create and migrate) database for dev and test environments:
% bundle exec hanami db prepare
% HANAMI_ENV=test bundle exec hanami db prepareRun dev server:
% bundle exec hanami serverand go to localhost:2300 by default
Run tests:
% bundle exec rakeRun console:
% bendle exec hanami consoleNOTE: Use RUBYOPT='-W0' for suppress warnings if need.
More resources: