Default issue tracker name added to gon variables

This commit is contained in:
Andrew8xx8 2013-02-19 16:37:43 +04:00
parent cf3cf3750e
commit bca72eac74

View file

@ -5,6 +5,7 @@ class ApplicationController < ActionController::Base
before_filter :add_abilities before_filter :add_abilities
before_filter :dev_tools if Rails.env == 'development' before_filter :dev_tools if Rails.env == 'development'
before_filter :default_headers before_filter :default_headers
before_filter :add_gon_variables
protect_from_forgery protect_from_forgery
@ -148,4 +149,8 @@ class ApplicationController < ActionController::Base
headers['X-Frame-Options'] = 'DENY' headers['X-Frame-Options'] = 'DENY'
headers['X-XSS-Protection'] = '1; mode=block' headers['X-XSS-Protection'] = '1; mode=block'
end end
def add_gon_variables
gon.default_issues_tracker = Project.issues_tracker.default_value
end
end end