Skip to content

Instantly share code, notes, and snippets.

@marcometz
Last active April 3, 2017 12:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcometz/aa514ff078f416ac305ae03839c18a04 to your computer and use it in GitHub Desktop.
Save marcometz/aa514ff078f416ac305ae03839c18a04 to your computer and use it in GitHub Desktop.
Find content in Goldencobra including "http://"
Goldencobra::Article.where("content LIKE '%http://%' OR teaser LIKE '%http://%' OR summary LIKE '%http://%' OR context_info LIKE '%http://%'").pluck(:id)
=> [3, 5, 7, 145, 146, 148, 149, 150, 152, 153, 155, 157, 158, 159, 160, 161, 162, 165, 172, 173, 232, 236]
Goldencobra::Widget.where("content LIKE '%http://%' OR mobile_content LIKE '%http://%' OR teaser LIKE '%http://%'").pluck(:id)
=> [5]
Goldencobra::Setting.where("value LIKE '%http://%'").pluck(:id)
=> [154, 158, 236]
GoldencobraEvents::EventPricegroup.where("description LIKE '%http://%' OR email_text LIKE '%http://%'").pluck(:id)
=> [77]
Goldencobra::Article.where("content LIKE '%http://%' OR teaser LIKE '%http://%' OR summary LIKE '%http://%' OR context_info LIKE '%http://%'").pluck(:id)
=> [3, 4, 6, 8, 11]
Goldencobra::Widget.where("content LIKE '%http://%' OR mobile_content LIKE '%http://%' OR teaser LIKE '%http://%'").pluck(:id)
=> [4, 7]
Goldencobra::Setting.where("value LIKE '%http://%'").pluck(:id)
=> [73]
Goldencobra::Article.where("content LIKE '%http://%' OR teaser LIKE '%http://%' OR summary LIKE '%http://%' OR context_info LIKE '%http://%'").pluck(:id)
=> [4, 6, 7]
Goldencobra::Setting.where("value LIKE '%http://%'").pluck(:id)
=> [73]
Goldencobra::Article.where("content LIKE '%http://%' OR teaser LIKE '%http://%' OR summary LIKE '%http://%' OR context_info LIKE '%http://%'").pluck(:id)
=> [4, 7, 8]
Goldencobra::Setting.where("value LIKE '%http://%'").pluck(:id)
=> [73]
Goldencobra::Article.where("content LIKE '%http://%' OR teaser LIKE '%http://%' OR summary LIKE '%http://%' OR context_info LIKE '%http://%'").pluck(:id)
=> [4, 6, 11]
Goldencobra::Widget.where("content LIKE '%http://%' OR mobile_content LIKE '%http://%' OR teaser LIKE '%http://%'").pluck(:id)
=> [4, 9]
Goldencobra::Setting.where("value LIKE '%http://%'").pluck(:id)
=> [73]
Goldencobra::Article.where("content LIKE '%http://%' OR teaser LIKE '%http://%' OR summary LIKE '%http://%' OR context_info LIKE '%http://%'").pluck(:id)
=> [2, 3, 4, 5, 7, 16, 32, 38, 42, 44, 46, 47, 48, 49, 50, 60, 70, 75, 77, 78, 79, 80, 82, 83, 84, 87, 88, 94, 96, 97, 98, 99, 127, 129, 130, 131, 132, 165, 168, 169, 171, 172, 175, 176, 178, 182, 195, 196, 206, 207, 210, 211, 221, 226, 227, 246, 255, 264]
Goldencobra::Widget.where("content LIKE '%http://%' OR mobile_content LIKE '%http://%' OR teaser LIKE '%http://%'").pluck(:id)
=> [9, 10, 11]
Goldencobra::Setting.where("value LIKE '%http://%'").pluck(:id)
=> [154, 236]
Goldencobra::Menue.where("target LIKE '%http://%'").pluck(:id)
=> [40, 27, 26]
GoldencobraEvents::Pricegroup.where("email_text LIKE '%http://%'").pluck(:id)
=> [11]
GoldencobraEvents::Sponsor.where("description LIKE '%http://%'").pluck(:id)
=> [4, 8]
GoldencobraEvents::EventPricegroup.where("description LIKE '%http://%' OR email_text LIKE '%http://%'").pluck(:id)
=> [10, 12, 56]
Goldencobra::Article.where("content LIKE '%http://%' OR teaser LIKE '%http://%' OR summary LIKE '%http://%' OR context_info LIKE '%http://%'").pluck(:id)
=> [4, 10, 11, 13, 34, 36, 49, 51, 52, 54, 56, 58, 68, 70, 71, 74, 77, 80, 81, 82, 83, 84, 88, 89, 91, 144, 145, 149, 150, 151, 152, 163, 164, 165, 182, 183, 184, 192, 202, 209, 210, 211, 212, 213, 234, 240, 252, 259, 260, 273, 275, 280, 282, 283, 294, 332, 367, 371]
Goldencobra::Widget.where("content LIKE '%http://%' OR mobile_content LIKE '%http://%' OR teaser LIKE '%http://%'").pluck(:id)
=> [2, 11, 12]
Goldencobra::Setting.where("value LIKE '%http://%'").pluck(:id)
=> [116, 161, 173, 235]
Goldencobra::Menue.where("target LIKE '%http://%'").pluck(:id)
=> [40, 27, 26]
Goldencobra::Article.where("content LIKE '%http://%' OR teaser LIKE '%http://%' OR summary LIKE '%http://%' OR context_info LIKE '%http://%'").pluck(:id)
=> [3, 6, 7, 10, 11, 12, 20, 21, 22, 23]
Goldencobra::Widget.where("content LIKE '%http://%' OR mobile_content LIKE '%http://%' OR teaser LIKE '%http://%'").pluck(:id)
=> [14, 15]
Goldencobra::Setting.where("value LIKE '%http://%'").pluck(:id)
=> [52, 73]
Goldencobra::Menue.where("target LIKE '%http://%'").pluck(:id)
=> [12]
Goldencobra::Article.where("content LIKE '%http://%' OR teaser LIKE '%http://%' OR summary LIKE '%http://%' OR context_info LIKE '%http://%'").pluck(:id)
=> [13, 17, 37, 46, 74, 101, 111]
Goldencobra::Widget.where("content LIKE '%http://%' OR mobile_content LIKE '%http://%' OR teaser LIKE '%http://%'").pluck(:id)
=> [1, 3, 4, 6]
Goldencobra::Setting.where("value LIKE '%http://%'").pluck(:id)
=> [43, 118, 129, 131]
Goldencobra::Article.where("content LIKE '%http://%' OR teaser LIKE '%http://%' OR summary LIKE '%http://%' OR context_info LIKE '%http://%'").pluck(:id)
=> [8, 9, 13, 141, 159, 160, 202, 208, 209, 212, 213, 215, 349, 350, 375, 384, 421, 429, 431, 432, 477, 543, 544, 554, 556, 558, 559]
Goldencobra::Widget.where("content LIKE '%http://%' OR mobile_content LIKE '%http://%' OR teaser LIKE '%http://%'").pluck(:id)
=> [4, 44, 45, 51, 56, 63]
Goldencobra::Setting.where("value LIKE '%http://%'").pluck(:id)
=> [73, 75]
Goldencobra::Menue.where("target LIKE '%http://%'").pluck(:id)
=> [87, 88]
Goldencobra::Article.where("content LIKE '%http://%' OR teaser LIKE '%http://%' OR summary LIKE '%http://%' OR context_info LIKE '%http://%'").pluck(:id)
=> [4, 9, 10, 13]
Goldencobra::Setting.where("value LIKE '%http://%'").pluck(:id)
=> [73, 75]
Goldencobra::Article.where("content LIKE '%http://%' OR teaser LIKE '%http://%' OR summary LIKE '%http://%' OR context_info LIKE '%http://%'").pluck(:id)
Goldencobra::Widget.where("content LIKE '%http://%' OR mobile_content LIKE '%http://%' OR teaser LIKE '%http://%'").pluck(:id)
Goldencobra::Setting.where("value LIKE '%http://%'").pluck(:id)
Goldencobra::Menue.where("target LIKE '%http://%'").pluck(:id)
GoldencobraEvents::Venue.where("description LIKE '%http://%'").pluck(:id)
GoldencobraEvents::Panel.where("description LIKE '%http://%'").pluck(:id)
GoldencobraEvents::Pricegroup.where("email_text LIKE '%http://%'").pluck(:id)
GoldencobraEvents::Sponsor.where("description LIKE '%http://%'").pluck(:id)
GoldencobraEvents::Event.where("description LIKE '%http://%'").pluck(:id)
GoldencobraEvents::EventPricegroup.where("description LIKE '%http://%' OR email_text LIKE '%http://%'").pluck(:id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment