engine/lib/locomotive/liquid/drops/current_user.rb
2012-04-21 00:54:54 +02:00

24 lines
353 B
Ruby

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