Module: Alchemy::UrlHelper

Included in:
ElementsHelper
Defined in:
app/helpers/alchemy/url_helper.rb

Instance Method Summary collapse

Instance Method Details

#download_alchemy_attachment_path(attachment) ⇒ Object

Returns the path for downloading an alchemy attachment



20
21
22
# File 'app/helpers/alchemy/url_helper.rb', line 20

def download_alchemy_attachment_path(attachment)
  alchemy.download_attachment_path(attachment, attachment.slug)
end

#download_alchemy_attachment_url(attachment) ⇒ Object

Returns the url for downloading an alchemy attachment



25
26
27
# File 'app/helpers/alchemy/url_helper.rb', line 25

def download_alchemy_attachment_url(attachment)
  alchemy.download_attachment_url(attachment, attachment.slug)
end

#show_alchemy_page_path(page, optional_params = {}) ⇒ Object

Returns the path for rendering an alchemy page



10
11
12
# File 'app/helpers/alchemy/url_helper.rb', line 10

def show_alchemy_page_path(page, optional_params = {})
  page.url_path(optional_params)
end

#show_alchemy_page_url(page, optional_params = {}) ⇒ Object

Returns the url for rendering an alchemy page



15
16
17
# File 'app/helpers/alchemy/url_helper.rb', line 15

def show_alchemy_page_url(page, optional_params = {})
  "#{request.base_url}#{page.url_path(optional_params)}"
end