Comments (23)
update: done some work here https://github.com/alepore/surveyor_gui/tree/rails4
not complete but it's running on Rails 4.1 and can create simple surveys
from surveyor_gui.
That's cool. I'd be happy to work with you on this. For now, as I have
time, my focus is to build up a test suite and see if I can refactor what's
there to be cleaner. I also have a bunch of code to move over to generate
reports and graphs (you may have noticed the "preview survey" button).
However, if you create a pull request, I'll bring over what you have for
Rails 4/Edge.
Be interested in your thoughts on the gem ...
On Wed, Apr 23, 2014 at 10:41 AM, Alessandro Lepore <
[email protected]> wrote:
update, done some work here
https://github.com/alepore/surveyor_gui/tree/rails4
probably not complete but it's running and can create simple surveys—
Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-41168946
.
from surveyor_gui.
I just looked a bit into surveyor and this gui, will share some thoughts later...
tests are always 👍 , of course.
one thing i'll probably need to do is adding support for more complex surveys on the gui, those with grouping, you know.
first, i will look if the rails4 fork can also work on rails 3...
from surveyor_gui.
I was thinking about the more complex surveys. It might make sense to make
the complexity configurable. That way you could present a simple interface
to a casual user, but have the full power available for users who need it.
That would make it more feasible to plug into a consumer-facing application.
On Apr 26, 2014 9:04 AM, "Alessandro Lepore" [email protected]
wrote:
I just looked a bit into surveyor and this gui, will share some thoughts
later...
tests are always [image: 👍] , of course.
one thing i'll probably need to do is adding support for more complex
surveys on the gui, those with grouping, you know.first, i will look if the rails4 fork can also work on rails 3...
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-41468140
.
from surveyor_gui.
@kjayma just a question: do you use this on rails 3.2/must support rails 3.2?
asking this because i think will be not trivial to build and support a rails 3.2+ version, and we already are at rails 4.1...
from surveyor_gui.
No, was on Rails 3.1 originally. Can you expound on your concerns with 3.2
and would they be solved by going directly to 4?
On Sat, May 10, 2014 at 4:35 AM, Alessandro Lepore <[email protected]
wrote:
@kjayma https://github.com/kjayma just a question: do you use this on
rails 3.2/must support rails 3.2?
asking this because i think will be not trivial to build and support a
rails 3.2+ version, and we are already at rails 4.1...—
Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-42736227
.
from surveyor_gui.
No objections to going directly to 4.1, just not where my focus has been so far.
from surveyor_gui.
Will update you soon, maybe it's not that hard to be backward compatible :)
from surveyor_gui.
ok my test branch was a bit of a mess so i started again.
phase one: make surveyor_gui specs pass with edge surveyor and rails 3.2.
some work is here https://github.com/alepore/surveyor_gui/tree/better_rails4 but it's not complete yet (27 failures).
if you have time please take a look at it.
phase two: make specs pass with rails 4.0 (looks like surveyor is not on rails 4.1 yet).
from surveyor_gui.
OK, I'll try to take a look this evening.
from surveyor_gui.
Left some comments in your commits. Looks good.
from surveyor_gui.
have you seen those spec failures? i'm not sure about the reasons...
from surveyor_gui.
No - I haven't downloaded code to try and run it - but I will
from surveyor_gui.
Just curious, what version of Ruby are you using?
from surveyor_gui.
I just ran tests in your fork. The results were:
28 examples, 0 failures
If your tests are failing, I'm doubly curious about your ruby version.
from surveyor_gui.
My mistake - I picked up the wrong branch
from surveyor_gui.
I'm on ruby 2.1
from surveyor_gui.
I'm on 1.9.3, however, I'm seeing the errors now. Have to go offline for a
while but i'll take a closer look tonight.
On May 14, 2014 4:48 PM, "Alessandro Lepore" [email protected]
wrote:
I'm on ruby 2.1
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-43135498
.
from surveyor_gui.
The problem seems to be when trying to create a new survey in the surveyforms_controller_methods. Getting an error during commit:
Unpermitted parameters: id, survey_sections_attributes
survey_sections_attributes needs to be permitted. Not sure why it is not, as it looks like it's in the permitted params array - maybe you can take another look.
from surveyor_gui.
added some missing attributes, 14 failures :)
from surveyor_gui.
Pull in latest version of master. That will fix at least some of these for sure.
from surveyor_gui.
Having problem updating a survey. Chokes on line 60 of surveyforms_controller_method.rb
Started PUT "/surveyforms/3" for 127.0.0.1 at 2014-05-17 12:58:33 -0400
Processing by SurveyformsController#update as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"p78uI4AcS7OnRu4MI9nxE/4YScsNIyk7bUN60PAPAwY=", "surveyform"=>{"id"=>"3", "title"=>"asdf", "template"=>"0", "survey_sections_attributes"=>{"0"=>{"id"=>"3", "modifiable"=>"t", "questions_attributes"=>{"0"=>{"id"=>"52", "display_order"=>"0", "modifiable"=>"t", "dummy_answer"=>""}}}}}, "commit"=>"Save Changes", "id"=>"3"}
Surveyform Load (0.1ms) SELECT "surveys".* FROM "surveys" WHERE "surveys"."id" = ? LIMIT 1 [["id", "3"]]
SurveySection Load (0.1ms) SELECT "survey_sections".* FROM "survey_sections" WHERE "survey_sections"."survey_id" IN (3) ORDER BY display_order
Unpermitted parameters: id
Unpermitted parameters: id
(0.0ms) begin transaction
Question Load (0.2ms) SELECT "questions".* FROM "questions" WHERE "questions"."survey_section_id" IS NULL AND "questions"."id" IN (52) ORDER BY display_order
(0.0ms) rollback transaction
Completed 404 Not Found in 5.9ms
Note the "unpermitted parameters: id"
The problem traces to line 221 in the same file:
::PermittedParams.new(params[:surveyform]).survey
When I do a simple survey update, the parameters coming in look like this:
=> {"utf8"=>"✓", "authenticity_token"=>"p78uI4AcS7OnRu4MI9nxE/4YScsNIyk7bUN60PAPAwY=", "surveyform"=>{"id"=>"3", "title"=>"asdf", "template"=>"0", "survey_sections_attributes"=>{"0"=>{"id"=>"3", "modifiable"=>"t", "questions_attributes"=>{"0"=>{"id"=>"52", "display_order"=>"0", "modifiable"=>"t", "dummy_answer"=>""}}}}}, "commit"=>"Save Changes", "id"=>"3"}
If I run line 221 in rails console against that same parameter string, I get the following:
=> {"title"=>"asdf", "template"=>"0", "survey_sections_attributes"=>{"0"=>{"modifiable"=>"t", "questions_attributes"=>{"0"=>{"display_order"=>"0", "dummy_answer"=>"", "id"=>"52", "modifiable"=>"t"}}}}}
It should contain
survey_sections_attributes"=>{"0"=>{"id"=>"3", "modifiable"=>"t",
But instead contains
"survey_sections_attributes"=>{"0"=>{"modifiable"=>"t"
It's dropping survey_section.id for some reason.
from surveyor_gui.
that should be fixed
from surveyor_gui.
Related Issues (20)
- Slider becomes dropdown after a logic dependency is added HOT 3
- Status of mandatory question feature HOT 1
- Feature: Dependencies to support sum of integer responses HOT 1
- Surveyor gui not available at /surveyforms like readme says HOT 1
- Documentation needed for layout files regarding #surveyor_gui_mount_point
- Support for HTML in answers HOT 1
- Asset precompile fails with undefined method `column_attributes' HOT 6
- Questions that are mandatory and dependent on another question do not display HOT 2
- Report generation doesn't scale HOT 14
- Testbed app raising Forbidden Attributes Error HOT 6
- Override suveyor partial inside surveyor_gui HOT 8
- Unable to perform rails g surveyor_gui:install HOT 6
- override surveyor layout HOT 2
- missing migration for QuestionType model? HOT 1
- SurveyorController Pundit authorization HOT 1
- Unable to execute the command "rails g surveyor_gui:install" HOT 1
- Help Required HOT 2
- Install process causing "PermittedParameters" error HOT 1
- Custom templates HOT 3
- Rails 6 surveyor_gui not working HOT 1
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 surveyor_gui.