Skip to content

Commit

Permalink
Fix Rubocop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
patanj101 committed Jul 7, 2024
1 parent 85a8126 commit 1e8ed1a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
26 changes: 15 additions & 11 deletions app/avo/resources/saved_search.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
class Avo::Resources::SavedSearch < Avo::BaseResource
self.includes = [:user, [export_attachment: :blob]]
module Avo
module Resources
class SavedSearch < Avo::BaseResource
self.includes = [:user, [export_attachment: :blob]]

# self.search = {
# query: -> { query.ransack(id_eq: params[:q], m: "or").result(distinct: false) }
# }
# self.search = {
# query: -> { query.ransack(id_eq: params[:q], m: "or").result(distinct: false) }
# }

def fields
field :id, as: :id
field :user_id, as: :number
field :params, as: :text
field :user, as: :belongs_to
field :export, as: :file, link_to_record: true
def fields
field :id, as: :id
field :user_id, as: :number
field :params, as: :text
field :user, as: :belongs_to
field :export, as: :file, link_to_record: true
end
end
end
end
4 changes: 3 additions & 1 deletion app/controllers/avo/saved_searches_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# This controller has been generated to enable Rails' resource routes.
# More information on https://docs.avohq.io/3.0/controllers.html
class Avo::SavedSearchesController < Avo::ResourcesController
module Avo
class SavedSearchesController < Avo::ResourcesController
end
end

0 comments on commit 1e8ed1a

Please sign in to comment.