Commit bca72eac747acbec42e4b93fecb4f6100e3ba257

Authored by Andrew8xx8
1 parent cf3cf375

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,6 +5,7 @@ class ApplicationController < ActionController::Base
5 before_filter :add_abilities 5 before_filter :add_abilities
6 before_filter :dev_tools if Rails.env == 'development' 6 before_filter :dev_tools if Rails.env == 'development'
7 before_filter :default_headers 7 before_filter :default_headers
  8 + before_filter :add_gon_variables
8 9
9 protect_from_forgery 10 protect_from_forgery
10 11
@@ -148,4 +149,8 @@ class ApplicationController < ActionController::Base @@ -148,4 +149,8 @@ class ApplicationController < ActionController::Base
148 headers['X-Frame-Options'] = 'DENY' 149 headers['X-Frame-Options'] = 'DENY'
149 headers['X-XSS-Protection'] = '1; mode=block' 150 headers['X-XSS-Protection'] = '1; mode=block'
150 end 151 end
  152 +
  153 + def add_gon_variables
  154 + gon.default_issues_tracker = Project.issues_tracker.default_value
  155 + end
151 end 156 end