announcement-test/app/helpers/admin/announcements_helper.rb

6 lines
227 B
Ruby
Raw Normal View History

2014-04-03 03:18:02 +00:00
module Admin::AnnouncementsHelper
2014-05-02 10:21:51 +00:00
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('//','/')
end
2014-04-03 03:18:02 +00:00
end