forked from saurabh/personal-journal
10 lines
367 B
Ruby
10 lines
367 B
Ruby
module Admin::JournalPapersHelper
|
|
def page_for_journal_paper(journal_paper_object)
|
|
journal_paper_page = nil
|
|
pages = Page.where(:module=>"journal_paper")
|
|
|
|
journal_paper_page = pages.first if journal_paper_page.nil?
|
|
request.protocol+(request.host_with_port+journal_paper_page.url+'/'+journal_paper_object.to_param).gsub('//','/') rescue "/"
|
|
end
|
|
end
|