Sha256: 277df1cffd13bf8335700fbc156231bbf0c7228f8600221b4f6126ab64af1608

Contents?: true

Size: 324 Bytes

Versions: 7

Compression:

Stored size: 324 Bytes

Contents

# coding: utf-8
module DeviseRussian
  module Controllers
    module Base
      def authenticate_user!
        permission_denied if current_user.nil?
      end

      def permission_denied
        flash[:error] = I18n.t(:permission_denied)
        redirect_to devise_russian.new_user_session_url
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
devise_russian-0.0.29 lib/devise_russian/controllers/base.rb
devise_russian-0.0.28 lib/devise_russian/controllers/base.rb
devise_russian-0.0.27 lib/devise_russian/controllers/base.rb
devise_russian-0.0.26 lib/devise_russian/controllers/base.rb
devise_russian-0.0.25 lib/devise_russian/controllers/base.rb
devise_russian-0.0.24 lib/devise_russian/controllers/base.rb
devise_russian-0.0.23 lib/devise_russian/controllers/base.rb