personal-journal/app/helpers/admin/journal_papers_helper.rb

10 lines
397 B
Ruby
Raw Normal View History

2014-06-04 03:55:13 +00:00
module Admin::JournalPapersHelper
2014-06-25 06:20:22 +00:00
def page_for_journal_paper(journal_paper)
journal_paper_page = nil
pages = Page.where(:module=>"member")
journal_paper_page = pages.first if journal_paper_page.nil?
request.protocol+(request.host_with_port+journal_paper_page.url+'/'+journal_paper.to_param+"?method=personal_plugin&plugin_name=JournalPaper").gsub('//','/') rescue "/"
end
2014-06-04 03:55:13 +00:00
end