Fix backend index page
This commit is contained in:
parent
4ae1040fc8
commit
658ffe34a1
|
@ -1,5 +1,7 @@
|
||||||
module Admin::AnnouncementsHelper
|
module Admin::AnnouncementsHelper
|
||||||
def page_for_bulletin(bulletin)
|
def page_for_bulletin(bulletin)
|
||||||
request.protocol+(request.host_with_port+Page.where(:categories.in=>[bulletin.category.id.to_s]).first.url+'/'+bulletin.to_param).gsub('//','/')
|
page = Page.where(:categories.in=>[bulletin.category.id.to_s]).first
|
||||||
|
page = Page.where(:module=>'announcement').first if page.nil?
|
||||||
|
request.protocol+(request.host_with_port+page.url+'/'+bulletin.to_param).gsub('//','/') rescue "/"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue