Comments (2)
I wasn't able to recreate your issue in an example application. Each of these different render statements worked fine in my app:
render "comment"
render "comment.json.jb"
render "comments/comment"
render "comments/comment.json.jb"
render partial: "comment"
render partial: "comment.json.jb"
render partial: "comments/comment"
render partial: "comments/comment.json.jb"
You can see the commit in my example app here: peterxjang/jb_example_app@e9b312f. Is there something more detailed in your example that I'm not accounting for?
As far as I understand, the jb
gem isn't responsible for handling the partial syntax. I believe the code that's responsible for parsing that syntax is part of Rails, jb
just uses the result. So if there was an issue with inconsistent partial syntax, fixing it would be outside the scope of this gem (someone correct me if I'm wrong here...)
from jb.
Thanks, Peter. I'll need to look into it in a few days as I don't have time now. I think you're right about Rails being the responsible party, though. Good to have you confirm it! I will try to get back to you next week.
from jb.
Related Issues (20)
- Any way to automatically camelCase all keys? HOT 4
- undefined local variable or method `json' HOT 3
- How to resolve the template digest HOT 3
- Question: Does the gem work with i.e. rails 5.2.pre? HOT 3
- JSONP support? HOT 2
- In rails 5 without "jbuilder" gem in Gemfile it returns "204 no content" HOT 1
- Next release? HOT 1
- Partials render weirdly
- Rails 6.0.0.beta3: render partial: wrong number of arguments (given 2, expected 0) HOT 1
- Really cool name and awesome performance. BTW jb in chinese means dick.^_^ HOT 1
- Are nested partials supported?
- Deprecation warning with generators in Rails 6.0.2 HOT 1
- Rendering partials inline requires #to_json HOT 3
- got ActionView::SyntaxErrorInTemplate error HOT 1
- Is editor syntax highlight support available on .jb? HOT 2
- How to use oj with jb?
- Using alongside jBuilder HOT 1
- TypeError when rendering a partial directly HOT 2
- JB returns output in a string when used with Rails 7.1 HOT 2
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 jb.