rubocop corrections
This commit is contained in:
parent
c63c6bc448
commit
de29815686
72 changed files with 468 additions and 311 deletions
|
@ -1,2 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ApplicationHelper
|
||||
end
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module BooksHelper
|
||||
def cart_summary
|
||||
number_to_currency(@books.map{ |b| b.price }.reduce(:+))
|
||||
number_to_currency(@books.map(&:price).reduce(:+))
|
||||
end
|
||||
|
||||
def can_book_be_added?(book)
|
||||
logged_in? && book.quantity.positive? && !current_user.books.exists?(book.id)
|
||||
end
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SessionsHelper
|
||||
end
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module UsersHelper
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue