tmiyamon / acts-as-taggable-array-on

A simple and high performance tagging gem for Rails using PostgreSQL array.
MIT License
125 stars 26 forks source link

silence Rails 6 dangerous query method deprecation #19

Closed elithecho closed 5 years ago

elithecho commented 6 years ago

To silence rails 6 errors, I added Arel.sql() to pluck method, even though the deprecation didn't make sense.

DEPRECATION WARNING: Dangerous query method (method whose arguments are used as raw SQL) called with non-attribute argument(s): "tag, count(*) as count". Non-attribute arguments will be disallowed in Rails 6.0. This method should not be called with user-provided values, such as request parameters or model attributes. Known-safe values can be passed by wrapping them in Arel.sql(). (called from block (2 levels) in acts_as_taggable_array_on at /Users/chong/Workspace/opensauce/acts-as-taggable-array-on/lib/acts-as-taggable-array-on/taggable.rb:34)
skatkov commented 6 years ago

Can you add rails 6 into testsuite for travis as well?

elithecho commented 6 years ago

I'm not sure if we're able to do that? @skatkov, it's not uploaded to rubygems yet

skatkov commented 6 years ago

@choonggg should be possible if you link directly to github repo.

elithecho commented 6 years ago

I've added rails master to gemspec, few failing due to Ruby version incompatible with Rails

cattekin commented 5 years ago

@choonggg @skatkov This PR should be mergeable if the testing commit is dropped

skatkov commented 5 years ago

I cherry-picked required commit from @choonggg and merged it with a separate pull request #28 .

Thanks everyone!