Scope Rubocop Inconsistent indentation detected

Hello,

in my model I have some scope for filtering but Rubucop still saying issue “C: Layout/IndentationConsistency: Inconsistent indentation detected.”

Whtat is the right formating of scope?

class PurchaseHistory < ApplicationRecord
  include Filterable
    scope :status, ->(status) { where status: status }
    scope :item, ->(item) { where item: item }
    scope :created_at, ->(created_at) { where("purchase_histories.created_at like ?", "#{created_at}%") }
end

Thanks.

class PurchaseHistory < ApplicationRecord
  include Filterable
  scope :status, ->(status) { where status: status }
  scope :item, ->(item) { where item: item }
  scope :created_at, ->(created_at) { where("purchase_histories.created_at like ?", "#{created_at}%") }
end

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs