NSW University: Ruby on Rails Project

Jae Chung
3 min readDec 4, 2021

--

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.

Static index page
Subject Index page with Pagenation

With login, user can access enrollment page to enroll and withdraw subjects.

Login User can select multiple check box.

Admin can access the pages for school administration such as making subjects, delete subjects and withdraw subjects on behalf of students.

Admin can handle User’s data
Nested form to write three tables.
Admin can delete subjects, then all the dependent data will be deleted as well.
3rd party log-in enabled

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.

Most cases of nested form

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 !!!

Repo: https://github.com/jaechung77/rails-project

--

--

Responses (1)