Commit cf3cf3750e53439cfaa8df786fd71308e4ef4867

Authored by Andrew8xx8
1 parent c6385e41

Gem gon added. It produces server-side variable values in javascript

Gemfile
... ... @@ -115,6 +115,7 @@ group :assets do
115 115 gem 'bootstrap-sass', "2.2.1.1"
116 116 gem "font-awesome-sass-rails", "~> 3.0.0"
117 117 gem "gemoji", "~> 1.2.1", require: 'emoji/railtie'
  118 + gem "gon"
118 119 end
119 120  
120 121 group :development do
... ...
Gemfile.lock
... ... @@ -184,6 +184,9 @@ GEM
184 184 pyu-ruby-sasl (~> 0.0.3.1)
185 185 rubyntlm (~> 0.1.1)
186 186 gitlab_yaml_db (1.0.0)
  187 + gon (4.0.2)
  188 + actionpack (>= 2.3.0)
  189 + json
187 190 grape (0.2.2)
188 191 activesupport
189 192 hashie (~> 1.2)
... ... @@ -483,6 +486,7 @@ DEPENDENCIES
483 486 gitlab_meta (= 5.0)
484 487 gitlab_omniauth-ldap (= 1.0.2)
485 488 gitlab_yaml_db (= 1.0.0)
  489 + gon
486 490 grack!
487 491 grape (~> 0.2.1)
488 492 grit!
... ...
app/views/layouts/_head.html.haml
... ... @@ -7,6 +7,7 @@
7 7 = stylesheet_link_tag "application"
8 8 = javascript_include_tag "application"
9 9 = csrf_meta_tags
  10 + = include_gon
10 11  
11 12 -# Atom feed
12 13 - if current_user
... ...