dimanche 13 novembre 2016

include concern requires devise authentication

I have concern created in my controller:

module MyConcern
  extend ActiveSupport::Concern

  included do
    require 'cgi'
    require 'application/backend/todo'
    require 'application/backend/parser'
    include Application::Backend::Todo
    include Application::Backend::Parser
  end
end

And I am calling it on controller:

include MyConcern

But when I trigger method create for example, it throws me to sign in with the following error: {"error":"Please sign-in to continue."}.

The question is, how to call the particular concern without requiring devise authentication?

Aucun commentaire:

Enregistrer un commentaire