Jamie Carr

Joined

570 Experience
5 Lessons Completed
0 Questions Solved

Activity

Posted in Advice on implementing a template system in Rails

You are a star! Thanks a lot Josh.

Posted in Advice on implementing a template system in Rails

Thank you so much for such an in depth answer, forgive my ignorance as I try to understand certain parts of your answer. As I understand it you would essentially make a new create action (from_template) in the origin model that takes the serialized data from the template model to create a new instance? And another action as_template that would be called to save the current instance into a serializable_hash stored in the template model?

It sounds like this is an implementation you have tackled before, if this is the case, is there a git repo that you are able/willing to share?

Thanks again for such a detailed response

Posted in Advice on implementing a template system in Rails

I am currently building a Rails app that allows users to create and manage projects. Within these projects are different groups and tasks which are of course associated models belonging to the project.

What I want to achieve is a way for users to save the current configuration of groups and tasks as a template that can then be used for projects they might make in the future. This is my first call to the GoRails community and I am keen to see how you guys would approach this as I have become a bit stuck! I have looked at self referencing models and even the deep clonable gem to clone entire projects as a template but both of these felt clunky and rely on the original project still existing.

Thanks in advance,
Jamie

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2020 GoRails, LLC. All rights reserved.