From e647aa257f0397e1f7ea937aaf38e5954ef814b4 Mon Sep 17 00:00:00 2001 From: Thibault Jouan Date: Mon, 4 May 2015 21:41:50 +0000 Subject: [PATCH] Configure standard rails javascript behavior --- Gemfile | 3 +++ Gemfile.lock | 10 ++++++++++ app/assets/javascripts/application.js | 2 ++ app/views/layouts/application.html.haml | 2 ++ 4 files changed, 17 insertions(+) create mode 100644 app/assets/javascripts/application.js diff --git a/Gemfile b/Gemfile index e7d5b2a..6ca891e 100644 --- a/Gemfile +++ b/Gemfile @@ -8,6 +8,9 @@ gem 'unicorn-rails' gem 'haml' gem 'rabl' +gem 'uglifier' +gem 'jquery-rails' + group :development, :test do gem 'pry-rails' diff --git a/Gemfile.lock b/Gemfile.lock index d7880df..f7a0ebf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -59,6 +59,7 @@ GEM coderay (1.1.0) diff-lcs (1.2.5) erubis (2.7.0) + execjs (2.5.2) factory_girl (4.5.0) activesupport (>= 3.0.0) factory_girl_rails (4.5.0) @@ -91,6 +92,10 @@ GEM tilt hitimes (1.2.2) i18n (0.7.0) + jquery-rails (4.0.3) + rails-dom-testing (~> 1.0) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) json (1.8.2) kgio (2.9.3) listen (2.10.0) @@ -197,6 +202,9 @@ GEM hitimes tzinfo (1.2.2) thread_safe (~> 0.1) + uglifier (2.7.1) + execjs (>= 0.3.0) + json (>= 1.8.0) unicorn (4.9.0) kgio (~> 2.6) rack @@ -218,6 +226,7 @@ DEPENDENCIES guard-rspec guard-spork haml + jquery-rails pg pry-rails rabl @@ -227,4 +236,5 @@ DEPENDENCIES rspec-rails shoulda-matchers spork! + uglifier unicorn-rails diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js new file mode 100644 index 0000000..31a96fd --- /dev/null +++ b/app/assets/javascripts/application.js @@ -0,0 +1,2 @@ +//= require jquery +//= require jquery_ujs diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 5cab5ae..0a61cb6 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -3,6 +3,8 @@ %head %meta{charset: 'utf-8'} %title scube + + = javascript_include_tag 'application' = csrf_meta_tag %body