diff --git a/Gemfile b/Gemfile index a2ace39..6d78a9b 100644 --- a/Gemfile +++ b/Gemfile @@ -41,3 +41,4 @@ gem 'bootstrap-sass' gem 'sass-rails', '~> 5.0.3' gem 'uglifier', '>= 2.7.1' gem 'jquery-rails' +gem 'jquery-atwho-rails' diff --git a/Gemfile.lock b/Gemfile.lock index 5f959aa..a54ffe3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -119,6 +119,7 @@ GEM hashie (5.0.0) i18n (0.9.5) concurrent-ruby (~> 1.0) + jquery-atwho-rails (1.5.4) jquery-rails (4.5.0) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) @@ -299,6 +300,7 @@ DEPENDENCIES dotenv-rails factory_girl (~> 4.0) guard + jquery-atwho-rails jquery-rails launchy omniauth diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 646c5ab..166269e 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -13,3 +13,4 @@ //= require jquery //= require jquery_ujs //= require_tree . +//= require jquery.atwho \ No newline at end of file diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index d27cc6a..2e5f933 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -12,6 +12,7 @@ * *= require_tree . *= require_self + //= require jquery.atwho */ // @import "bootstrap"; diff --git a/app/controllers/events_controller.rb b/app/controllers/events_controller.rb index 8d39ad8..d1e46be 100644 --- a/app/controllers/events_controller.rb +++ b/app/controllers/events_controller.rb @@ -17,6 +17,7 @@ def show @attendees[person] = User.find_by(username: person) end @user_id = User.find_by(username: u).id + @usernames = User.pluck(:username) end def index diff --git a/app/views/events/show.html.erb b/app/views/events/show.html.erb index 076d02c..c77c698 100644 --- a/app/views/events/show.html.erb +++ b/app/views/events/show.html.erb @@ -194,3 +194,8 @@ <% end %> <%# %> + + \ No newline at end of file