Default issue tracker name added to gon variables
This commit is contained in:
parent
cf3cf3750e
commit
bca72eac74
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue