cirandas.net

ref: master

plugins/site_tour/lib/site_tour_plugin/site_tour_helper.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
module SiteTourPlugin::SiteTourHelper

  def parse_tour_description(description)
    p = profile rescue nil
    if !p.nil? && description.present?
      description.gsub('{profile.identifier}', p.identifier).
        gsub('{profile.name}', p.name).
        gsub('{profile.url}', url_for(p.url))
    else
      description
    end
  end

end