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

Shut off include PublicActivity::StoreController for Devise #393

Open
noctivityinc opened this issue Nov 21, 2024 · 1 comment
Open

Shut off include PublicActivity::StoreController for Devise #393

noctivityinc opened this issue Nov 21, 2024 · 1 comment
Assignees

Comments

@noctivityinc
Copy link

Im getting the following error when using include PublicActivity::StoreController in my application controller:

ArgumentError:  Nil location provided. Can't build URI.

Which appears to be happening here:

/gems/public_activity-3.0.1/lib/public_activity/utility/store_controller.rb:27 in store_controller_for_public_activity

I tried disabling PublicActivity if it's a devise controller but that doesnt seem to work:

 def skip_public_activity_for_devise
    PublicActivity.enabled = false if is_devise_controller?
  end

  def is_devise_controller?
    self.class.name.start_with?("Devise::") ||
    self.class.name.start_with?("Accounts::") ||
    self.class.name.start_with?("Admin::Devise::")
  end

Is there another way I can handle this for devise controllers dealing with signing in or password resets?

@ur5us
Copy link
Collaborator

ur5us commented Nov 29, 2024

I’m using PublicActivity in an app using Devise, also. However, I’ve never run into that issue. Could you provide a minimal app to reproduce this problem?

@ur5us ur5us self-assigned this Nov 29, 2024
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