Comments (11)
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.
It might be worth auto deleting/recreating in this case, assuming the question has no chidren/answers
from rapidfire.
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.
What I mean is if question.answers = [ ] then you can safely delete the question and recreate as a checkbox, etc
from rapidfire.
hmm, interesting, and what if answers
are not blank?
from rapidfire.
Then error = "Sorry you cannot change the format of a question with associated answers"
from rapidfire.
okie, sounds good.
from rapidfire.
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.
By the way, is there anyway to edit a survey once it is submitted?
from rapidfire.
yes, but unfortunately that code is not yet merged into master:
43f285f
from rapidfire.
Thanks I will add this to my fork. By the way, thank you for the gem!
from rapidfire.
Related Issues (20)
- Acts_as_surveyable? HOT 2
- API support HOT 4
- after attempt redirect HOT 1
- Question text as a label HOT 1
- Feature Request: Images as part of the question HOT 1
- Rails 5.1: Directly inheriting from ActiveRecord::Migration is not supported HOT 1
- Rails 5.1: Index Creation fails HOT 3
- undefined local variable or method `rapidfire' for #<Rapidfire::QuestionsController:0x0....> HOT 1
- When using checkboxes, validation always fails HOT 6
- undefined method `before_filter' for Rapidfire::SurveysController:Class Did you mean? before_action HOT 2
- ActionController::UrlGenerationError in Rapidfire::Surveys#index HOT 1
- Bundler could not find compatible versions for gem "active_model_serializers" HOT 2
- One attempt for each user
- Links for Rapidfire redirect with bad link HOT 1
- Change `after_survey_content` to `thank_you` HOT 1
- Rename locales to include rapidfire prefix HOT 1
- answers_delimiter = "\r\n" HOT 3
- undefined method `page' for Survey:Module HOT 1
- Non logged in users not able to submit responses
- Path issues HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rapidfire.