Sha256: d4b790d9a6c1e907572ab8bc8bb75733d25bc49bbf5d197b3c6873988e191ab0

Contents?: true

Size: 439 Bytes

Versions: 2

Compression:

Stored size: 439 Bytes

Contents

namespace :current_user do
  desc "Show a path to the sign in page"
  task :sign_in_path => :environment  do
    key =  ::CurrentUser.authentication_key

    if key.present?
      include Rails.application.routes.url_helpers
      puts "#{current_user_path}/#{key}/sign_in"
    else
      # TODO: extract KEY_FILE_PATH constant.
      puts 'Error: there is no authentication key. Check out config/current_user/key file.'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
current_user-0.2.1 lib/tasks/current_user_tasks.rake
current_user-0.2.0 lib/tasks/current_user_tasks.rake