I'm struggling to grasp the overall application layout of Rails.
Currently, I am developing a web app for football plays where coaches can log in and access the /coach/index page. On this page, they can draw their plays using a JavaScript front end. My challenge lies in saving these plays by sending JSON to the server to store them in the correct Play database entry.
Is my current layout logical? Should coaches be directed to this specific page upon logging in to draw, save, create, and load plays, or should these actions be performed on pages controlled by the Play controller?
I need assistance with saving the JSON data generated by the play drawing engine into the database. How can I achieve this without a traditional form approach typically used in Rails AJAX tutorials? How do I make an AJAX POST/GET request to the Rails DB without an explicit form and handle the input?
My lack of experience in Rails is evident as I navigate through this project. What would be the best practice to ensure that coaches have access to the plays they have created? How can controllers interact with resources managed by other controllers effectively? Are there any established conventions for this scenario?
Upon further consideration, it seems more appropriate to direct coaches to the /plays directory after logging in and adjust the create functions there to align with my desired workflow. Thank you for your support and guidance in advance.