This repository has been archived on 2024-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
Sequenzia/lib/Rails/Panel/helpers/ApplicationHelper.php
2013-10-02 11:14:53 -05:00

14 lines
538 B
PHP
Executable File

<?php
class ApplicationHelper extends Rails\ActionView\Helper
{
public function linkTo($link, $url_params, array $attrs = array())
{
if ($url_params == 'root') {
return $this->base()->linkTo($link, $url_params, $attrs);
} else {
$base_path = Rails::application()->router()->basePath();
$attrs['href'] = $base_path . '/' . Rails::application()->config()->rails_panel_path . '/' . substr($url_params, 1);
return $this->contentTag('a', $link, $attrs);
}
}
}