Skip to content
This repository has been archived by the owner on Aug 15, 2018. It is now read-only.

Commit

Permalink
moved tab helper to its own file
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Adams committed Sep 9, 2008
1 parent 090c04a commit 0caf630
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
11 changes: 1 addition & 10 deletions app/helpers/application_helper.rb
Expand Up @@ -3,14 +3,5 @@ module ApplicationHelper
def current_database
ActiveRecord::Base.connection().current_database
end

def create_tab(tab_name, tab_controler, tab_action)
link_to_unless_current("#{tab_name}", {:controller => "#{tab_controler}", :action => "#{tab_action}"}) do
output = '<span>'
output << tab_name
output << '</span>'
output
end
end

end
end
10 changes: 10 additions & 0 deletions app/helpers/tabs_helper.rb
@@ -0,0 +1,10 @@
module TabsHelper
def create_tab(tab_name, tab_controller, tab_action)
link_to_unless_current("#{tab_name}", {:controller => "#{tab_controller}", :action => "#{tab_action}"}) do
output = '<span>'
output << tab_name
output << '</span>'
output
end
end
end

0 comments on commit 0caf630

Please sign in to comment.