Skip to content

Commit

Permalink
stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
epugh committed Jan 19, 2024
1 parent c332d7e commit 65d6485
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
10 changes: 0 additions & 10 deletions app/models/search_endpoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,6 @@ class SearchEndpoint < ApplicationRecord
}
# rubocop:enable Layout/LineLength

scope :for_user_directly_owned2, ->(user) {
joins('
LEFT OUTER JOIN `tries` ON `tries`.`search_endpoint_id` = `search_endpoints`.`id`
LEFT OUTER JOIN `cases` ON `cases`.`id` = `tries`.`case_id`
LEFT OUTER JOIN `users` ON `users`.`id` = `cases`.`owner_id`
').where('
`users`.`id` = ?
', user.id)
}

scope :for_user_directly_owned, ->(user) {
where('
`search_endpoints`.`owner_id` = ?
Expand Down
5 changes: 4 additions & 1 deletion db/sample_data_seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,10 @@ def print_case_info the_case
case_names = ["Typeahead: Dairy", "Typeahead: Meats", "Typeahead: Dessert", "Typeahead: Fruit & Veg"]

case_names.each do |case_name|

# check if we've already created the case
if realistic_activity_user.cases.exists?(case_name: case_name)
break
end
kase = realistic_activity_user.cases.create case_name: case_name

days_of_experimentation = rand(3..20) # somewhere between
Expand Down

0 comments on commit 65d6485

Please sign in to comment.