Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Kuroko2::JobDefinition.search_by #11

Merged
merged 1 commit into from
Nov 9, 2016

Conversation

hogelog
Copy link
Contributor

@hogelog hogelog commented Nov 9, 2016

Kuroko2::JobDefinition.search_by doesn't work correct unless Kuroko2.config.table_name_prefix is empty.

Started GET "/definitions?utf8=%E2%9C%93&q=ghoege" for ::1 at 2016-11-09 12:04:44 +0900
Processing by Kuroko2::JobDefinitionsController#index as JS
  Parameters: {"utf8"=>"✓", "q"=>"ghoege"}
  Kuroko2::User Load (0.4ms)  SELECT  `kuroko2_users`.* FROM `kuroko2_users` WHERE `kuroko2_users`.`suspended_at` IS NULL AND `kuroko2_users`.`id` = 1 LIMIT 1
Unpermitted parameter: utf8
   (0.4ms)  SELECT DISTINCT `kuroko2_job_definition_tags`.`job_definition_id` FROM `kuroko2_job_definition_tags` INNER JOIN `kuroko2_tags` ON `kuroko2_tags`.`id` = `kuroko2_job_de
 WHERE (tags.name LIKE '%ghoege%')
Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.8ms)


  
ActiveRecord::StatementInvalid (Mysql2::Error: Unknown column 'tags.name' in 'where clause': SELECT DISTINCT `kuroko2_job_definition_tags`.`job_definition_id` FROM `kuroko2_job_de
finition_tags` INNER JOIN `kuroko2_tags` ON `kuroko2_tags`.`id` = `kuroko2_job_definition_tags`.`tag_id` WHERE (tags.name LIKE '%ghoege%')):

Job definition search doesn't work.
image

Please review.

@eagletmt
Copy link
Member

eagletmt commented Nov 9, 2016

LGTM

1 similar comment
@eisuke
Copy link
Member

eisuke commented Nov 9, 2016

LGTM

@eisuke eisuke merged commit 84fe62e into cookpad:master Nov 9, 2016
@hogelog hogelog deleted the fix-search-by branch November 9, 2016 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants