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

Seeing undefined method 'simulated path' #108

Open
obromios opened this issue Apr 26, 2019 · 2 comments
Open

Seeing undefined method 'simulated path' #108

obromios opened this issue Apr 26, 2019 · 2 comments

Comments

@obromios
Copy link

Using rails 5.2.2.1 and ruby 2.5.5 with apitome 0.3.0, am getting the following error when access the documentation path:

     Failure/Error: click_link 'Documentation'
     
     ActionView::Template::Error:
       undefined method `simulated_path' for #<#<Class:0x00007fe01f8d3450>:0x00007fe01f8d1ad8>

My initializer uses default settings, apart from

 config.doc_path = "doc/api"
  config.title = "The API Documentation"
  config.layout = "layouts/apidocs.html.erb"
  config.readme = "../api.md"

At the end of my routes file, I have
mount Apitome::Engine => 'apidocs#index'
and I do have authentication using

class ApiController < ActionController::API
  include Response
  include ExceptionHandler

  before_action :authorize_request
  attr_reader :current_user

    private

    def authorize_request
      @current_user = (AuthorizeApiRequest.new(request.headers).call)[:user]
    end
end

As this looks similar to this issue, I tried
using the master branch and also ref: "c779d67", but to no avail. It looks like the problem starts in 0.2.1.

@gschmidt-nuance
Copy link

In the config/initializers/apitome.rb, try adding config.simulated_response = false

@obromios
Copy link
Author

obromios commented Feb 8, 2022

Thank you, but I have refactored so did not need apitome anymore, so cannot test this. Hope someone else can confirm this works.

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

2 participants