Sha256: c44f43108c18c186175e7830fd8f2a2addf099aedd6b0ef730b3d2aad5308166
Contents?: true
Size: 904 Bytes
Versions: 1
Compression:
Stored size: 904 Bytes
Contents
module Alchemy module Page::Users extend ActiveSupport::Concern # Returns the name of the creator of this page. # # If no creator could be found or associated user model # does not respond to +#name+ it returns +'unknown'+ # def creator_name (creator && creator.try(:name)) || I18n.t('unknown') end # Returns the name of the last updater of this page. # # If no updater could be found or associated user model # does not respond to +#name+ it returns +'unknown'+ # def updater_name (updater && updater.try(:name)) || I18n.t('unknown') end # Returns the name of the user currently editing this page. # # If no locker could be found or associated user model # does not respond to +#name+ it returns +'unknown'+ # def locker_name (locker && locker.try(:name)) || I18n.t('unknown') end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
alchemy_cms-3.0.0.rc5 | app/models/alchemy/page/users.rb |