Sha256: 6846780103c08f4ae8036c6d56cc295c2fff81f6b1334b6260b28d5c72e64b90

Contents?: true

Size: 545 Bytes

Versions: 2

Compression:

Stored size: 545 Bytes

Contents

$LOAD_PATH.unshift File.dirname(__FILE__)

require 'current_users'

module CurrentUserAccounts
  include ::CurrentUsers

  def self.included(base)
    base.extend ::CurrentUsers
  end

  def current_user_account
    @current_user_account ||= ::UserAccount.new(current_user, :roles => [:user])
  end

  def current_guest_account
    @current_guest_account ||= ::UserAccount.new(current_guest, :roles => [:guest])
  end
  
  def current_admin_account
    @current_admin_account ||= ::AdminAccount.new(current_admin, :roles => [:admin])
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cantango-api-0.1.3 spec/helpers/current_user_accounts.rb
cantango-api-0.1.2 spec/helpers/current_user_accounts.rb