Sha256: 1b5610a9a550d06d1aceb6266b13c34f5eb7e62ac93d7a074cb8a585e13af3ce

Contents?: true

Size: 510 Bytes

Versions: 2

Compression:

Stored size: 510 Bytes

Contents

module Devise
  module Verifiable
    module Controller
      module Helpers
        extend ActiveSupport::Concern

        def self.define_helpers(mapping)
          mapping = mapping.name

          class_eval <<-METHODS, __FILE__, __LINE__ + 1

            def authenticate_verified_#{mapping}!(opts={})
              authenticate_#{mapping}!
              redirect_to new_user_verification_path unless current_#{mapping}.verified?
            end

          METHODS
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
devise-verifiable-0.0.2 lib/devise/controller/helpers.rb
devise-verifiable-0.0.1 lib/devise/controller/helpers.rb