Home > front end >  I need help creating a form with a Likert Scale
I need help creating a form with a Likert Scale

Time:06-13

hi I'm new in RoR and I need a bit of help I'm going to try to explain this in the best way I can (English is not my native language)

1: I have 3 types of users (inspirational, transformational, and relational) and each one of those should have a form with questions and responses Something like this (photo below) I have this model (photo of the model) and this is my form (photo of the form) I know this is not going to work out because in the model I have the responses as boolean and in the form, I have declared as a string soo there is no way that a going to be able to save what the users send. and for now, a don't have associations. photo of the Likert scale

I don't know if this is the best approach to make that, what do you think? or I was thinking to make a model named question which has a question (string) and another model called responses with the possible responses as a boolean (maybe I don't even need the model question, IDK)

2: but then for each response, I have to give each user a response based in he's responses (for example if the user responds more than 50% "Siempre" I should return a text and another text if he responds "casi siempre" 60%....) I don't know how to make that. I need a suggestion, please

CodePudding user response:

I ended up thinking of making the Likert scale as a range and passing the data as an array

  • Related