Skip to content

Instantly share code, notes, and snippets.

@edavis10
Created January 28, 2009 18:15
Show Gist options
  • Save edavis10/54108 to your computer and use it in GitHub Desktop.
Save edavis10/54108 to your computer and use it in GitHub Desktop.
Adds a new tab to Redmine's User Administration page
require_dependency 'users_helper'
module RateUsersHelperPatch
def self.included(base) # :nodoc:
base.send(:include, InstanceMethods)
base.class_eval do
alias_method_chain :user_settings_tabs, :rate_tab
end
end
module InstanceMethods
# Adds a rates tab to the user administration page
def user_settings_tabs_with_rate_tab
tabs = user_settings_tabs_without_rate_tab
tabs << { :name => 'rates', :partial => 'users/rates', :label => :rate_label_rate_history}
return tabs
end
end
end
UsersHelper.send(:include, RateUsersHelperPatch)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment