Sha256: 5c91f52929f39e487513cf880bb74a72644b29dc0c03109346261d3a9ec6d695

Contents?: true

Size: 301 Bytes

Versions: 2

Compression:

Stored size: 301 Bytes

Contents

module RailsMarketplace
  module AdminHelper
    # Logs in the given seller.
    def admin_log_in(admin)
      session[:admin_id] = admin.id
    end

    def admin_logged_in?
    	!session[:admin_id].nil?
    end

    def admin_log_out
    	session.delete(:admin_id)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_marketplace-0.0.2 app/helpers/rails_marketplace/admin_helper.rb
rails_marketplace-0.0.1 app/helpers/rails_marketplace/admin_helper.rb