Devise and Rails Metal

271 views
Skip to first unread message

Rinaldi Fonseca

unread,
Feb 27, 2011, 11:25:00 PM2/27/11
to Devise
I searched about this, but I didnt find.

Is it possible to use Devise with a Metal Controller?

I need to user the method: before_filter :authenticate_user!

My controller is like:


class TestController < ActionController::Metal

include ActionController::Rendering
include AbstractController::Callbacks


before_filter :authenticate_user!

def index
#some implementation
end

end

Roman Simecek

unread,
May 23, 2012, 5:25:06 AM5/23/12
to plataforma...@googlegroups.com
Have you found a solution for this problem?
I'm in the same situation.

Thanks for a response!

tcc

unread,
Aug 17, 2012, 1:13:11 PM8/17/12
to plataforma...@googlegroups.com
Hi,
My solution had to include these helpers:

class DocsController < ActionController::Metal
  include AbstractController::Logger
  include AbstractController::Callbacks
  include AbstractController::Helpers
  include Devise::Controllers::Helpers
  before_filter :authenticate_user!

  def index 
  #some implementation 
  end 
 end 
Reply all
Reply to author
Forward
0 new messages