DEV Community

Discussion on: Building an Advanced Search Form in Rails 6

Collapse
 
sakko profile image
SaKKo

You can quickly search multiple columns in 1 line with ransack gem.
github.com/activerecord-hackery/ra...

example

Pokemon.ransack(name_or_type_cont: params[:q])
Enter fullscreen mode Exit fullscreen mode
Collapse
 
branmar97 profile image
Brandon Marrero πŸ‡ΊπŸ‡Έ

Hi, Sakko! That is one powerful gem, but this tutorial is more about learning how to build forms without gems. Using a gem may not always be the best choice, especially since excessive use of gems can slow down performance and increase memory usage. I also believe it is nice to learn how to build many features manually. I edited this post to reflect that. Thank you :-)

Collapse
 
sakko profile image
SaKKo

Oh, I like the whole article. Very good tutorial ∠( ̄∧ ̄)
I just wanna share this gem so that SQL search won't be so painful.
please write more (β‰§βˆ‡β‰¦)

Thread Thread
 
branmar97 profile image
Brandon Marrero πŸ‡ΊπŸ‡Έ

Haha, I completely understand. And please stick around. I like to share what I learn and learn from others :-)