diff --git a/app/assets/javascripts/gifts.js.coffee b/app/assets/javascripts/gifts.js.coffee index e97c0ec..2064d89 100644 --- a/app/assets/javascripts/gifts.js.coffee +++ b/app/assets/javascripts/gifts.js.coffee @@ -3,6 +3,8 @@ # You can use CoffeeScript in this file: http://coffeescript.org/ +# Should be consitat with the project and use either all JS +# or all Coffeescript $ -> $('.gift').hover (event) -> console.log("hover triggered") diff --git a/app/assets/javascripts/jazController.js b/app/assets/javascripts/jazController.js index 7692e5e..5e38d2b 100644 --- a/app/assets/javascripts/jazController.js +++ b/app/assets/javascripts/jazController.js @@ -18,7 +18,9 @@ Controller.prototype = { url: "/gifts.json", type: "GET", //'for' loop extracts gift data from the JSON & creates gift objects + // consider moving this anonymous function into a named function success: function(data) { + // don't commit debugging statements console.log(data); self.gifts = []; for (var i=0; i
+ <%= gift.title %> @@ -41,4 +42,4 @@ <% end %>
-
\ No newline at end of file + diff --git a/app/views/dashboard/requested.html.erb b/app/views/dashboard/requested.html.erb index 6af5644..16bca14 100644 --- a/app/views/dashboard/requested.html.erb +++ b/app/views/dashboard/requested.html.erb @@ -14,6 +14,7 @@ @@ -43,4 +44,4 @@ <% end %> - \ No newline at end of file + diff --git a/config/routes.rb b/config/routes.rb index d13f09f..1c65fbf 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -18,6 +18,9 @@ # Jaz JS learning objectives: get 'gifts/:id/jaz', to: 'gifts#jaz' + # Remove commented out code. I know this is generated by Rails but good to remove + # commented out code ASAP as it just adds noise and hangs around long after it + # is intended to. # The priority is based upon order of creation: first created -> highest priority. # See how all your routes lay out with "rake routes".