-
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
JSON API for wiki pages #1069 #1071
Conversation
@@ -41,13 +41,18 @@ def show | |||
.page(params[:page]) | |||
.order("node_revisions.timestamp DESC") | |||
end | |||
|
|||
respond_with(@nodes) do |format| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, but I think this has to go down on line 51, at the end of the action method, or some of the variables used in the templates won't exist when we try to render it. Make sense? Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay will do it.
@notes = nodes.where('node.nid NOT IN (?)', qids) if @node_type == "note" | ||
@questions = nodes.where('node.nid IN (?)', qids) if @node_type == "questions" | ||
@wikis = nodes if @node_type == "wiki" | ||
@nodes = nodes if @node_type == "maps" | ||
@title = params[:id] | ||
set_sidebar :tags, [params[:id]] | ||
|
||
respond_with(@nodes) do |format| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, and i mistyped -- this should be @notes
, not @nodes
. Sorry! and on lines 53-4.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apologies!
Is it ok now? |
It looks good, lets see how the tests do! Thanks! |
Hmm, ok your test didn't pass: ================================================================================
Error: test_tag_show_JSON(TagControllerTest): TypeError: no implicit conversion of ActionController::TestResponse into String
test/functional/tag_controller_test.rb:110:in `block in <class:TagControllerTest>' Let's see... |
What should I do? |
Oh, you know what, i think maybe it needs to be: json = ActiveSupport::JSON.decode(@response.body) Can you try that? |
I'll be in transit for 15m, but can check on this later, thanks! |
Perfect; merging now! 🎉 If you're looking for a new challenge, please take a look at our Thanks! Oh, and also -- for future reference, it's important to do your development on a named feature branch -- you can read more here: https://publiclab.org/wiki/contributing-to-public-lab-software#A+sample+git+workflow And there are instructions on rewinding back your master branch here: https://publiclab.org/wiki/contributing-to-public-lab-software#Rewinding+the+master+branch Thanks again!!! |
Okay thank you!! |
I think that may be record time for a new issue being filed and fixed --
thank YOU!
…On Tue, Dec 6, 2016 at 6:04 PM, 500swapnil ***@***.***> wrote:
Okay thank you!!
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#1071 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ5aX_-BnXrYDSg0TKNVcT6JYl9DSks5rFenxgaJpZM4LF94w>
.
|
Make sure these boxes are checked before your pull request is ready to be reviewed and merged. Thanks!
rake test:all
schema.rb.example
has been updated if any database migrations were addedPlease be sure you've reviewed our contribution guidelines at https://publiclab.org/wiki/contributing-to-public-lab-software
We have a loose schedule of reviewing and pulling in changes every Tuesday and Friday, and publishing changes on Fridays. Please alert developers on plots-dev@googlegroups.com when your request is ready or if you need assistance.
Thanks!