# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
  def path?(path)
    controller_path[0..path.length-1] == path
  end
  
  def word_for_change(change)
    case change.downcase
      when 'a' then return 'Added'
      when 'd' then return 'Deleted'
      when 'm' then return 'Modified'
      when 'mv' then return 'Moved'
      when 'cp' then return 'Copied'
      else return change
    end
  end
  
  def highlight_as(filename)
    case filename.split('.').last.downcase
      when 'js', 'as' then return 'javascript'
      when 'rb', 'rakefile' then return 'ruby'
      when 'rhtml', 'erb', 'html', 'xml' then return 'html'
      else 'plain'
    end
  end
  
  def modified?(flag)
    flag.downcase == 'm'
  end
  
  def title(ttl)
    @title = ttl || ' '
  end
end

# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
  def path?(path)
    controller_path[0..path.length-1] == path
  end
  
  def word_for_change(change)
    case change.downcase
      when 'a'  then  'Added'
      when 'd'  then  'Deleted'
      when 'm'  then  'Modified'
      when 'mv' then  'Moved'
      when 'cp' then  'Copied'
      else return change
    end
  end
  
  def highlight_as(filename)
    case filename.split('.').last.downcase
      when 'js', 'as' then 'javascript'
      when 'rb', 'rakefile' then 'ruby'
      when 'rhtml', 'erb', 'html', 'xml' then 'html'
      else 'plain'
    end
  end
  
  def modified?(flag)
    flag.downcase == 'm'
  end
  
  def title(ttl)
    @title = ttl || ' '
  end
end

Remove returns from case statements
Remove returns from case statements

git-svn-id: 00255c29502d8dc24a666882d37304e67b560e94@1520 8456e5f2-bb15-0410-bd20-b44782a1fb1e
