Skip to content
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

Partials render weirdly #24

Open
newstler opened this issue Feb 13, 2019 · 0 comments
Open

Partials render weirdly #24

newstler opened this issue Feb 13, 2019 · 0 comments

Comments

@newstler
Copy link

newstler commented Feb 13, 2019

Hi, I have a common situation: index and show actions both should render an object partial. When I place the code into the corresponding views (index.json.jb and show.json.jb) everything is good, but when I place there any modifications of render partial: 'object', collection: @objects, it renders weird output:

"<!-- begin: app/views/api/v1/objects/_object.json.jb (from app/views/api/v1/objects/index.json.jb:1) -->\n[{:id=>1, :name=>\"Name 1\", :position=>0, :description=>\"Test 1\"}, {:id=>2, :name=>\"Name 2\", :position=>1, :description=>\"Test 2\"}]<!-- end: app/views/api/v1/objects/_object.json.jb (from app/views/api/v1/objects/index.json.jb:1) -->"

Is it me doing something wrong or is it a bug? Thank you.

Btw, I'm on Ruby 2.3.4 Rails 4.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant