Comments (7)
cc @yuki24
from jbuilder.
@jtannas Apologies for the long delay, but here is a fix for the broken compatibility: #531
from jbuilder.
Introduced here in #501. Related to #514.
from jbuilder.
#524 should address this issue.
from jbuilder.
Unfortunately there is a little incompatibility introduced by #501. I have removed the #empty?
call, but ActionView's CollectionRenderer
requires #length
or #size
to be implemented in Rails 6.1.
@jtannas @dhh I wonder if this is okay...
from jbuilder.
Not sure I fully understand the issue? The enumerable passed in much implement #length or #size?
from jbuilder.
Unfortunately this is a little incompatibility Introduced by #501. I have removed the
#empty?
call, but ActionView'sCollectionRenderer
requires#length
or#size
to be implemented in Rails 6.1.
yeah, I'm seeing that in the test run when upgrading to 2.11.4 that it's still failing when attempting to render a PG::Result.
Failure/Error:
json.partial!(
'sample_partial',
collection: @sample_pg_result,
as: :row,
)
ActionView::Template::Error:
undefined method `size' for #<PG::Result:0x0000563f594901a8 status=PGRES_TUPLES_OK ntuples=0 nfields=7 cmd_tuples=0>
Did you mean? fsize
Edit: looks like there's some relevant discussion in #514 about how before it would work on anything implementing Enumerable
but now additional methods are required
#514 (comment)
from jbuilder.
Related Issues (20)
- `json.array! @reports, :id, :count` always give me all the attributes.[Not an issue] HOT 1
- Cache keys - recyclable by default?
- JBuilder 2.11.3: uninitialized constant ActionView::AbstractRenderer on load under Nginx/Passsenger HOT 3
- Cache key depending on multiple dependencies HOT 1
- jBuilder 2.11.3, Rails 6.1.4.1 fail to render objects that are child of Simpledelegator HOT 2
- 2.11.3 and 2.11.4 missing from Changelog HOT 1
- Does not work with Rails 7 api_only = true HOT 7
- Incorrect url comment notes in generated scaffold controller in a namespace.
- ActionView::MissingTemplate after upgrading to Rails 7 HOT 3
- Auto-rendering ActionText body contents instead of their attributes hash
- JBuilder Template Test failing on CI HOT 5
- I am moving my rails application to rails only api but jbuilder is returning a blank screen HOT 5
- Can't seem to render unescaped HTML in Jbuilder HOT 2
- Passing locals to `json.array!` ? HOT 2
- `json.partial!` line in template is not executed when passing locals using new hash syntax HOT 2
- Jbuilder ignore_nil, key_format, and deep_format_keys not working (Rails 7) HOT 1
- Jbuilder ignore_nil, key_format, and deep_format_keys not working (Rails 7)
- Sample use in standalone Ruby script HOT 1
- ActionView 7.0.7 collection caching breaking on jbuilder arrays 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 jbuilder.