-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate Question posting form template from regular /post form #910
Comments
Would it be ok if I give this one a go? |
HI Sandy! Great to hear from you again :D |
Not sure yet, as I haven't entirely checked things out...but will let you know if I run into trouble :-) |
I opened a 2nd pull request as I set up a Cloud9 workspace rather than trying to work locally. Let me know if you want me to close the first one. Also it looks like the testing didn't pass....I think it is the test edit...I wasn't sure about the last part about "probably remove the |
I logged into the Cloud9 workspace, and ran "rake test" and got:
So maybe I'm not seeing the same state you were looking at 22 days ago... anyhow, happy to help now (or just after Thanksgiving, of course!) |
Looks like this is now complete!! Closing. |
In #904, we're tackling the re-design of the note posting form. But to implement the re-design, we'll need some routing changes.
If you'd like to do this before #904, you can just copy the template at
/app/views/editor/post.html.erb
to/app/views/editor/question.html.erb
and the redirects will be in place -- the actual template redesign in #904 can then follow.First, we should make a new route, something like
/questions/new
- which also renders thequestion
action in the editor controller. This would be done at/config/routes.rb
-- nearby and above similar routes starting with "question".Then we'll want to intercept and re-route any incoming requests to the current
/post
action in the editor controller: https://github.com/publiclab/plots2/blob/master/app/controllers/editor_controller.rb#L6That is, if it has a tag starting with
question:
we should redirect it to a new method for thequestion
form. Think about creating a line in thepost
method in the editor controller:Then we'll want to adjust the test that checks the redirect currently in place:
https://github.com/publiclab/plots2/blob/master/test/functional/editor_controller_test.rb#L40-L47
currently it just checks that the title is correct. We'll want to add:
And probably remove the
assert_select
line.The text was updated successfully, but these errors were encountered: