I don't think I've set up the initializer wrong as inside the create.json.jbuilder, I used a debugger and checked that calling json, I can see that ignore_nil and other specified options have been set correctly. Yet the actual behaviour is not according to the expectations.
P.S: It's also not loading the success attribute from application.json.jbuilder that I had mentioned.
File Structure:
config/initializers/jbuilder.rb
config/routes.rb
app/views/layouts/application.json.jbuilder
app/views/api/v1/posts/create.json.jbuilder
Expected Result:
Actual Result:
I don't think I've set up the initializer wrong as inside the create.json.jbuilder, I used a debugger and checked that calling json, I can see that ignore_nil and other specified options have been set correctly. Yet the actual behaviour is not according to the expectations.
P.S: It's also not loading the success attribute from application.json.jbuilder that I had mentioned.
Any help regarding this would be nice 😄