This is a post of my RoR project that made me be banging against a wall. The biggest barrier was how to break Ruby’s magic. I’d better attend Hogwarts Wizarding School. lol.
Requirements
of the project are RESTful, 3rd party Auth including ordinary login function, validation and nested form.
Features
Without login, non-user can access certain pages.
With login, user can access enrollment page to enroll and withdraw subjects.
Admin can access the pages for school administration such as making subjects, delete subjects and withdraw subjects on behalf of students.
ER used
Styling
BootStrap 5 and Font Awesome are used for styling.
Gems
Devise gem is used for Sign in and Sign up, OmniAuth for 3rd party authentication, Pagination for indexed page, Faker for seed data, and CarrierWave for file and image upload. How to install and usage are described on https://github.com/jaechung77/rails-project/blob/main/README.md
Challenges
The trickiest part was handling three Models in nested form. By googling, most of handling nested form are from has_many side.
But mine is to handle opposite direction.
Conclusion
By my head banging, the hard ruby wall started cracking and now I can do little bit of ruby magic.
Thanks Ruby and my mentor Sha !!!