Skip to content

Shut off include PublicActivity::StoreController for Devise #393

Open
@noctivityinc

Description

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

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