Module: Alchemy::Page::PageUsers

Extended by:
ActiveSupport::Concern
Included in:
Alchemy::Page
Defined in:
app/models/alchemy/page/page_users.rb

Instance Method Summary collapse

Instance Method Details

#creatorObject

Returns the creator of this page.


9
10
11
# File 'app/models/alchemy/page/page_users.rb', line 9

def creator
  get_page_user(creator_id)
end

#creator_nameObject

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'


30
31
32
# File 'app/models/alchemy/page/page_users.rb', line 30

def creator_name
  (creator && creator.try(:name)) || Alchemy.t('unknown')
end

#lockerObject

Returns the user currently editing this page.


21
22
23
# File 'app/models/alchemy/page/page_users.rb', line 21

def locker
  get_page_user(locked_by)
end

#locker_nameObject

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'


48
49
50
# File 'app/models/alchemy/page/page_users.rb', line 48

def locker_name
  (locker && locker.try(:name)) || Alchemy.t('unknown')
end

#updaterObject

Returns the last updater of this page.


15
16
17
# File 'app/models/alchemy/page/page_users.rb', line 15

def updater
  get_page_user(updater_id)
end

#updater_nameObject

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'


39
40
41
# File 'app/models/alchemy/page/page_users.rb', line 39

def updater_name
  (updater && updater.try(:name)) || Alchemy.t('unknown')
end