Skip to content
王梦琪 edited this page Mar 7, 2017 · 4 revisions

Devise Helpers in a cell (eg. current_user)

To use your Devise Helpers, eg. current_user, user_signed_in?, etc, in your cells, just do

  class TransactionWidget < Apotomo::Widget
    include Devise::Controllers::Helpers
   
    def foo
      puts current_user
    end
  end

it works for cells and apotomo