activerecord-hackery / ransack

Object-based searching.
https://activerecord-hackery.github.io/ransack/
MIT License
5.61k stars 782 forks source link

respond to missing method #1483

Open xiaohui-zhangxh opened 3 months ago

xiaohui-zhangxh commented 3 months ago

it's useful to check if a condition is given from params.

<% if @q.respond_to?(:name_cont) %>
  <p>You're searching name ... </p>
<% end %>