GithubHelp home page GithubHelp logo

Comments (23)

alepore avatar alepore commented on July 19, 2024

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.

kjayma avatar kjayma commented on July 19, 2024

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.

alepore avatar alepore commented on July 19, 2024

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.

kjayma avatar kjayma commented on July 19, 2024

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.

alepore avatar alepore commented on July 19, 2024

@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.

kjayma avatar kjayma commented on July 19, 2024

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.

kjayma avatar kjayma commented on July 19, 2024

No objections to going directly to 4.1, just not where my focus has been so far.

from surveyor_gui.

alepore avatar alepore commented on July 19, 2024

Will update you soon, maybe it's not that hard to be backward compatible :)

from surveyor_gui.

alepore avatar alepore commented on July 19, 2024

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.

kjayma avatar kjayma commented on July 19, 2024

OK, I'll try to take a look this evening.

from surveyor_gui.

kjayma avatar kjayma commented on July 19, 2024

Left some comments in your commits. Looks good.

from surveyor_gui.

alepore avatar alepore commented on July 19, 2024

have you seen those spec failures? i'm not sure about the reasons...

from surveyor_gui.

kjayma avatar kjayma commented on July 19, 2024

No - I haven't downloaded code to try and run it - but I will

from surveyor_gui.

kjayma avatar kjayma commented on July 19, 2024

Just curious, what version of Ruby are you using?

from surveyor_gui.

kjayma avatar kjayma commented on July 19, 2024

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.

kjayma avatar kjayma commented on July 19, 2024

My mistake - I picked up the wrong branch

from surveyor_gui.

alepore avatar alepore commented on July 19, 2024

I'm on ruby 2.1

from surveyor_gui.

kjayma avatar kjayma commented on July 19, 2024

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.

kjayma avatar kjayma commented on July 19, 2024

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.

alepore avatar alepore commented on July 19, 2024

added some missing attributes, 14 failures :)

from surveyor_gui.

kjayma avatar kjayma commented on July 19, 2024

Pull in latest version of master. That will fix at least some of these for sure.

from surveyor_gui.

kjayma avatar kjayma commented on July 19, 2024

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.

alepore avatar alepore commented on July 19, 2024

that should be fixed

from surveyor_gui.

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.