Module: DmCore::AccountHelper

Included in:
AvatarUploader, DmCore::Admin::AdminController, ApplicationController
Defined in:
app/helpers/dm_core/account_helper.rb

Instance Method Summary collapse

Instance Method Details

#account_prefixObject

Get the account prefix that is used for locating items on the filesystem.




11
12
13
# File 'app/helpers/dm_core/account_helper.rb', line 11

def 
  .
end

#account_protected_assets(leading_slash = true) ⇒ Object

Returns the path (from the root of the site) to the protected asset files

Pass in false not to include leading slash



25
26
27
# File 'app/helpers/dm_core/account_helper.rb', line 25

def (leading_slash = true)
  leading_slash ? "/protected_assets/#{}" : "protected_assets/#{}"
end

#account_site_assets(leading_slash = true) ⇒ Object

Returns the path (from the root of the site) to the site general asset files

Pass in false not to include leading slash



18
19
20
# File 'app/helpers/dm_core/account_helper.rb', line 18

def (leading_slash = true)
  leading_slash ? "/site_assets/#{}/site" : "site_assets/#{}/site"
end

#account_site_assets_media(leading_slash = true) ⇒ Object

Returns the path (from the root of the site) to the site’s uploadable asset folder, which is ‘media’

Pass in false not to include leading slash



33
34
35
# File 'app/helpers/dm_core/account_helper.rb', line 33

def (leading_slash = true)
  (leading_slash) + '/media'
end

#account_site_assets_media_urlObject

Returns the url of the site’s media asset files

Pass in false not to include leading slash



47
48
49
# File 'app/helpers/dm_core/account_helper.rb', line 47

def 
  Account.current.url_base + (true)
end

#account_site_assets_urlObject

Returns the url of the site’s general asset files

Pass in false not to include leading slash



40
41
42
# File 'app/helpers/dm_core/account_helper.rb', line 40

def 
  Account.current.url_base + (true)
end

#current_accountObject




5
6
7
# File 'app/helpers/dm_core/account_helper.rb', line 5

def 
  Account.current
end