daily pastebin goal
83%
SHARE
TWEET

Untitled

a guest May 16th, 2018 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # ... сначала собираем нужный файндер
  2.  
  3.   @finder = ModelName.all
  4.  
  5.   params_hash.each {|key, value|
  6.     case key
  7.     when "green"
  8.       @finder = @finder.green( value )
  9.     when "warm"
  10.       @finder = @finder.warm( value )
  11.     when "soft"
  12.       @finder = @finder.soft( value )
  13.     ...
  14.     end
  15.   }
  16.  
  17. # ... потом используем
  18.   @result = @finder.find( :all )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top