jmeyer82 / learn2live

0 stars 0 forks source link

Searching #3

Open Mirv opened 6 years ago

Mirv commented 6 years ago

https://medium.com/@zylberberg.jonathan/creating-a-search-form-in-rails-5-77fdef6be74d

Mirv commented 6 years ago

Needs a call via method: :get to the index method https://rails5-api-mode-mirv.c9users.io/users ... possibly no plural on users, but pretty sure it's with plural.

Mirv commented 6 years ago

https://rails5-api-mode-mirv.c9users.io/users?match_target=Studio+Tecnico&by_field=attributes_roles

Query is good - backend needs to be fixed to get a match when it's hit.

Started GET "/users?match_target=Studio+Tecnico&by_field=attributes_roles" for 174.20.58.57 at 2018-09-23 11:23:11 +0000
Processing by UsersController#index as HTML
  Parameters: {"match_target"=>"Studio Tecnico", "by_field"=>"attributes_roles"}
Completed 204 No Content in 1ms (ActiveRecord: 0.0ms)
Mirv commented 6 years ago

Currently the index displays everything even on the URL listed above - so I have a bit of tinkering to do with this ... it's search in syntax string - I took some short cuts versus normal matching ...


[{"id":1,"name":"Montgomery Scott","profile_type":"Searcher","roles":"Studio Tecnico","education":"Faker::Educator","time":"2018-09-23 10:26:49 +0000","description_roles":"DMus in Business Management","description_education":"Master of Public Diplomacy in Financial Architecture","attributes_roles":"Studio Tecnico","attributes_education":"beatae_quas","skill_share":"false","created_at":"2018-09-23T11:36:10.479Z","updated_at":"2018-09-23T11:36:10.479Z"},{"id":2,"name":"Charles Tucker III","profile_type":"Searcher","roles":"Studio Legale","education":"Faker::Educator","time":"2018-09-22 04:49:39 +0000","description_roles":"BSc in Medical Philosophy","description_education":"Master of Mathematics and Computer Science in Human Resource Engineering","attributes_roles":"Laboratorio","attributes_education":"fuga_modi","skill_share":"true","created_at":"2018-09-23T11:36:10.498Z","updated_at":"2018-09-23T11:36:10.498Z"},{"id":3,"name":"Charles Tucker III","profile_type":"Searcher","roles":"Studio Legale","education":"Faker::Educator","time":"2018-09-21 17:08:47 +0000","description_roles":"MA in Business Management","description_education":"Master of Information Systems in Human Resource Studies","attributes_roles":"Studio Legale","attributes_education":"distinctio.et","skill_share":"false","created_at":"2018-09-23T11:36:10.516Z","updated_at":"2018-09-23T11:36:10.516Z"},{"id":4,"name":"Hikaru Sulu","profile_type":"Searcher","roles":"Laboratorio","education":"Faker::Educator","time":"2018-09-21 23:35:15 +0000","description_roles":"MD in Financial Economics","description_education":"Bachelor of Science in Pharmacy in Social Economics","attributes_roles":"Studio Legale","attributes_education":"excepturi.deserunt","skill_share":"true","created_at":"2018-09-23T11:36:10.533Z","updated_at":"2018-09-23T11:36:10.533Z"},{"id":5,"name":"Malcolm Reed","profile_type":"Searcher","roles":"Studio Legale","education":"Faker::Educator","time":"2018-09-21 13:33:09 +0000","description_roles":"MCA in Systems Architecture","description_education":"Master of International Economics in Systems Studies","attributes_roles":"Studio Legale","attributes_education":"voluptatem.molestiae","skill_share":"false","created_at":"2018-09-23T11:36:10.549Z","updated_at":"2018-09-23T11:36:10.549Z"},{"id":6,"name":"Chakotay","profile_type":"Searcher","roles":"Studio Tecnico","education":"Faker::Educator","time":"2018-09-21 07:28:06 +0000","description_roles":"BPharm in Business Production","description_education":"Bachelor of Science in Architectural Engineering in Systems Production","attributes_roles":"Laboratorio","attributes_education":"in.pariatur","skill_share":"false","created_at":"2018-09-23T11:36:10.565Z","updated_at":"2018-09-23T11:36:10.565Z"},{"id":7,"name":"Harry Kim","profile_type":"Searcher","roles":"Studio Tecnico","education":"Faker::Educator","time":"2018-09-23 14:40:30 +0000","description_roles":"BCom in Financial Architecture","description_education":"Master of Studies in Law in Financial Production","attributes_roles":"Studio Tecnico","attributes_education":"sunt_et","skill_share":"true","created_at":"2018-09-23T11:36:10.585Z","updated_at":"2018-09-23T11:36:10.585Z"},{"id":8,"name":"Kes","profile_type":"Searcher","roles":"Laboratorio","education":"Faker::Educator","time":"2018-09-23 21:30:53 +0000","description_roles":"MPharm in Industrial Engineering","description_education":"Bachelor of Arts in Anthropology in Systems Engineering","attributes_roles":"Studio Legale","attributes_education":"id_quibusdam","skill_share":"false","created_at":"2018-09-23T11:36:10.604Z","updated_at":"2018-09-23T11:36:10.604Z"},{"id":9,"name":"Jadzia Dax","profile_type":"Searcher","roles":"Studio Legale","education":"Faker::Educator","time":"2018-09-21 12:28:48 +0000","description_roles":"AB in Medical Architecture","description_education":"Bachelor of Science in Real-Time Interactive Simulation in Industrial Management","attributes_roles":"Laboratorio","attributes_education":"voluptatum.at","skill_share":"false","created_at":"2018-09-23T11:36:10.622Z","updated_at":"2018-09-23T11:36:10.622Z"},{"id":10,"name":"Natasha Yar","profile_type":"Searcher","roles":"Studio Tecnico","education":"Faker::Educator","time":"2018-09-23 12:29:12 +0000","description_roles":"BS in Medical Education","description_education":"Master of Science in Computing Research in Business Accountancy","attributes_roles":"Laboratorio","attributes_education":"illum_est","skill_share":"false","created_at":"2018-09-23T11:36:10.636Z","updated_at":"2018-09-23T11:36:10.636Z"}]```