Skip to content

Commit c6581fd

Browse files
committed
Big Fix
1 parent 3baffce commit c6581fd

4 files changed

Lines changed: 20 additions & 12 deletions

File tree

app/assets/javascripts/application.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@
1717
//= require_tree .
1818
//= require bootstrap
1919
//= require jquery.nicescroll
20+
21+
// 1. Simple mode, it styles document scrollbar:
Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +0,0 @@
1-
// 1. Simple mode, it styles document scrollbar:
2-
// $(function() {
3-
// $("body").niceScroll({
4-
// cursorwidth: 12,
5-
// cursoropacitymin: 0.4,
6-
// cursorcolor: 'firebrick',
7-
// cursorborder: 'none',
8-
// cursorborderradius: 4,
9-
// autohidemode: 'leave'
10-
// }); // free your immagination
11-
// });

app/models/line_item.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
class LineItem < ApplicationRecord
22
belongs_to :product
3-
belongs_to :cart
3+
belongs_to :cart , dependent: :destroy
44
# belongs_to :order
55

66
# LOGIC

app/views/layouts/application.html.erb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,22 @@
1616
<%= render 'layouts/footer' %>
1717
<%= debug(params) if Rails.env.development? %>
1818
</div>
19+
20+
<!-- Add the custom scroll bar -->
21+
<script >
22+
$(function () {
23+
$("body").niceScroll({
24+
cursorwidth: 12,
25+
cursoropacitymin: 0.4,
26+
cursorcolor: 'firebrick',
27+
cursorborder: 'none',
28+
cursorborderradius: 4,
29+
autohidemode: 'leave'
30+
}); // free your immagination
31+
$("body").niceScroll().resize();
32+
// console.log("Entered..");
33+
});
34+
</script>
35+
1936
</body>
2037
</html>

0 commit comments

Comments
 (0)