diff --git a/app/models/concerns/filterable_concern.rb b/app/models/concerns/filterable_concern.rb index 2c49eff3..04da2863 100644 --- a/app/models/concerns/filterable_concern.rb +++ b/app/models/concerns/filterable_concern.rb @@ -22,7 +22,7 @@ def filter_by_associations(associations) Array(attrs).each do |attr| filter_name = "#{name}_#{attr}" scope "filter_by_#{filter_name}", ->(value) { - joins(name).where("#{name}.#{attr}" => value) + joins(name.to_sym).where(name => {attr => value}) } self::VALID_FILTERS.push(filter_name.to_s) diff --git a/app/models/media_listener.rb b/app/models/media_listener.rb index 6f807036..323e5b69 100644 --- a/app/models/media_listener.rb +++ b/app/models/media_listener.rb @@ -32,6 +32,6 @@ def running? private def run(command) - system "bundle exec #{SERVICE_PATH} #{command} -d #{self.class.config.pid_dir} -n #{self.class.config.service_name}" + system "bundle exec #{SERVICE_PATH.shellescape} #{command.shellescape} -d #{self.class.config.pid_dir.shellescape} -n #{self.class.config.service_name.shellescape}" end end diff --git a/test/system/setting_test.rb b/test/system/setting_test.rb index 06709263..46782b87 100644 --- a/test/system/setting_test.rb +++ b/test/system/setting_test.rb @@ -16,7 +16,6 @@ class SettingSystemTest < ApplicationSystemTestCase assert_text("Updated successfully") end - test "update discogs token" do visit setting_url