Module: ApplicationHelper
- Defined in:
- app/helpers/application_helper.rb
Overview
Methods added to this helper will be available to all templates in the application.
Instance Method Summary collapse
Instance Method Details
#link_to(*args, &block) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/helpers/application_helper.rb', line 3 def link_to(*args, &block) if (request.subdomains[0] \ and args[1][:id] \ and (args[1][:id] == request.subdomains[0] \ or (args[1][:id].class == Elt and args[1][:id].id == request.subdomains[0]))) args[1][:id] = '' elsif ! request.subdomains[0] \ and args[1][:id].class == Elt \ and args[1][:id].id == Elt.find(:first, :conditions => "parent_id = 'ROOT'", :order => 'created_on').id args[1][:id] = '' end super(*args) end |