Need a unique gift idea?
A Pastebin account makes a great Christmas gift


a guest Mar 8th, 2018 50 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. return true if option.conditions.blank?
  2.     conditional_string = option.conditions
  3.     variable_array = option.conditions.split(/[!&(),]/)
  4.     variable_array = variable_array.find{|variable| !variable.blank?}
  5.     unless variable_array.blank?
  6.       variable_array.each do |variable|
  7.         included = listing.options.split(',').include?(variable)
  8.         conditional_string.gsub!(variable, included.to_s)
  9.       end
  10.     end
  11.     conditional_string.gsub!('&', '&&').gsub!(',', '||')
  12.     eval(conditional_string)
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