Changeset 1358

Show
Ignore:
Timestamp:
08/17/08 11:51:09 (5 months ago)
Author:
alban
Message:

Prise en charge de bonnes-ondes.local en dev

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/app/controllers/public_controller.rb

    r1349 r1358  
    102102 
    103103    show_slug = "" 
    104     if request.host =~ /^(.*).bonnes-ondes.fr$/ 
     104    if request.host =~ /^(.*).bonnes-ondes.(fr|local)$/ 
    105105      show_slug = $1 
    106106    end 
  • trunk/app/helpers/application_helper.rb

    r1344 r1358  
    33  include RateHelper 
    44 
     5  def main_domain 
     6    RAILS_ENV == 'development' ? 'bonnes-ondes.local' : 'bonnes-ondes.fr' 
     7  end 
     8 
    59  def show_hostname(show) 
    610    hostname = if show.host.nil? 
    7       "#{show.slug}.bonnes-ondes.fr
     11      "#{show.slug}.#{main_domain}
    812    else 
    913      show.host.name