Skip to content

Commit

Permalink
Add an example JS file using jQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
calleluks committed Feb 1, 2019
1 parent 6ba8424 commit e7e2678
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Expand Up @@ -36,6 +36,8 @@ gem 'jbuilder', '~> 2.5'
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false

gem 'jquery-rails'

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
Expand Down
5 changes: 5 additions & 0 deletions Gemfile.lock
Expand Up @@ -85,6 +85,10 @@ GEM
jbuilder (2.8.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
jquery-rails (4.3.3)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
Expand Down Expand Up @@ -200,6 +204,7 @@ DEPENDENCIES
chromedriver-helper
coffee-rails (~> 4.2)
jbuilder (~> 2.5)
jquery-rails
listen (>= 3.0.5, < 3.2)
puma (~> 3.11)
rails (~> 5.2.2)
Expand Down
1 change: 1 addition & 0 deletions app/assets/javascripts/application.js
Expand Up @@ -13,4 +13,5 @@
//= require rails-ujs
//= require activestorage
//= require turbolinks
//= require jquery
//= require_tree .
3 changes: 3 additions & 0 deletions app/assets/javascripts/greeting.js
@@ -0,0 +1,3 @@
$(function() {
$('h1').text('Hello from Sprockets!')
})

0 comments on commit e7e2678

Please sign in to comment.