engine/lib/locomotive/liquid/drops/current_user.rb

24 lines
353 B
Ruby
Raw Normal View History

2012-04-20 22:54:54 +00:00
module Locomotive
module Liquid
module Drops
class CurrentUser < Base
include ::Rails.application.routes.url_helpers
def logged_in?
_source.present?
end
def name
_source.name if logged_in?
end
def email
_source.email if logged_in?
end
end
end
end
end