summaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/custom_fields_controller.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/app/controllers/custom_fields_controller.rb b/app/controllers/custom_fields_controller.rb
index c20516a1d..95d0d507f 100644
--- a/app/controllers/custom_fields_controller.rb
+++ b/app/controllers/custom_fields_controller.rb
@@ -21,10 +21,18 @@ class CustomFieldsController < ApplicationController
before_filter :require_admin
before_filter :build_new_custom_field, :only => [:new, :create]
before_filter :find_custom_field, :only => [:edit, :update, :destroy]
+ accept_api_auth :index
def index
- @custom_fields_by_type = CustomField.all.group_by {|f| f.class.name }
- @tab = params[:tab] || 'IssueCustomField'
+ respond_to do |format|
+ format.html {
+ @custom_fields_by_type = CustomField.all.group_by {|f| f.class.name }
+ @tab = params[:tab] || 'IssueCustomField'
+ }
+ format.api {
+ @custom_fields = CustomField.all
+ }
+ end
end
def new