Giter Club home page Giter Club logo

Comments (11)

iffyuva avatar iffyuva commented on August 12, 2024

yes, changing type of question is not supported atm.
https://github.com/code-mancers/rapidfire/blob/master/app/services/rapidfire/question_form.rb#L55
reason being: we are using STI, and its kindof tricky to morph one question type to another.
its cheap to delete and recreate questions. are you facing problems with delete + recreate?

from rapidfire.

abrambailey avatar abrambailey commented on August 12, 2024

It might be worth auto deleting/recreating in this case, assuming the question has no chidren/answers

from rapidfire.

iffyuva avatar iffyuva commented on August 12, 2024

oh no. answers are associated with questions via question_id: https://github.com/code-mancers/rapidfire/blob/master/db/migrate/20130502195504_create_rapidfire_answers.rb#L5. if lib delete/recreate, then there will be problems with associating answers, and calculating survey results.

from rapidfire.

abrambailey avatar abrambailey commented on August 12, 2024

What I mean is if question.answers = [ ] then you can safely delete the question and recreate as a checkbox, etc

from rapidfire.

iffyuva avatar iffyuva commented on August 12, 2024

hmm, interesting, and what if answers are not blank?

from rapidfire.

abrambailey avatar abrambailey commented on August 12, 2024

Then error = "Sorry you cannot change the format of a question with associated answers"

from rapidfire.

iffyuva avatar iffyuva commented on August 12, 2024

okie, sounds good.

from rapidfire.

abrambailey avatar abrambailey commented on August 12, 2024

It's a minor issue, but even if you just provide an error message (and don't allow changing question types at all), it might help other people. I was confused about them not changing

from rapidfire.

abrambailey avatar abrambailey commented on August 12, 2024

By the way, is there anyway to edit a survey once it is submitted?

from rapidfire.

iffyuva avatar iffyuva commented on August 12, 2024

yes, but unfortunately that code is not yet merged into master:
43f285f

from rapidfire.

abrambailey avatar abrambailey commented on August 12, 2024

Thanks I will add this to my fork. By the way, thank you for the gem!

from rapidfire.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.