Skip to content

I am moving my rails application to rails only api but jbuilder is returning a blank screen #541

@hassanrbh

Description

@hassanrbh

I check all of the previous talks about the same problem , I suppose to solve it with include ActionView::Rendering but when I include it, I get a different error saying undefined method 'include?"

/Users/mac/.rvm/gems/ruby-2.7.0/gems/actionpack-6.1.4.1/lib/abstract_controller/helpers.rb:148:in block in helper': undefined method include?' for nil:NilClass (NoMethodError)

class ApplicationController < ActionController::API
include ActionController::RequestForgeryProtection
include JSONAPI::ActsAsResourceController
include ActionController::Helpers
include ActionController::Cookies
include ActionController::ImplicitRender
include ActionView::Rendering

protect_from_forgery unless: -> { request.format.json? || request.format.xml? }
after_action :flash_to_headers
before_action :store_current_location, :unless => :devise_controller?
before_action :flow_filter
before_action :configure_permitted_parameters, if: :devise_controller?
before_action :check_temporary_user, if: :devise_controller?
before_action :authenticate_and_set_user
before_action :authenticate_author_sdk
before_action :authorize_user_or_author_access_token?
before_action :underscore_params!
respond_to :json
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions