Commit bca72eac747acbec42e4b93fecb4f6100e3ba257
1 parent
cf3cf375
Exists in
master
and in
4 other branches
Default issue tracker name added to gon variables
Showing
1 changed file
with
5 additions
and
0 deletions
Show diff stats
app/controllers/application_controller.rb
| ... | ... | @@ -5,6 +5,7 @@ class ApplicationController < ActionController::Base |
| 5 | 5 | before_filter :add_abilities |
| 6 | 6 | before_filter :dev_tools if Rails.env == 'development' |
| 7 | 7 | before_filter :default_headers |
| 8 | + before_filter :add_gon_variables | |
| 8 | 9 | |
| 9 | 10 | protect_from_forgery |
| 10 | 11 | |
| ... | ... | @@ -148,4 +149,8 @@ class ApplicationController < ActionController::Base |
| 148 | 149 | headers['X-Frame-Options'] = 'DENY' |
| 149 | 150 | headers['X-XSS-Protection'] = '1; mode=block' |
| 150 | 151 | end |
| 152 | + | |
| 153 | + def add_gon_variables | |
| 154 | + gon.default_issues_tracker = Project.issues_tracker.default_value | |
| 155 | + end | |
| 151 | 156 | end | ... | ... |