ruby on rails - How do I stop a pry.binding conditionally on a symbol or string? -
i have rails
app running , placing binding.pry
within method called lot. want stop on specific string
on symbol
, cannot find syntax. here code:
def can?(resource, operation, options={}) binding.pry credentials(options[:as]).each |credential| can = credential.can?(resource, operation, options) homecoming can unless can.nil? end nil end
i see in docs break
keyword, can't seem create work either. please show me syntax supposed be?
you can add together if
def can?(resource, operation, options={}) binding.pry if your_condition_is_met credentials(options[:as]).each |credential| can = credential.can?(resource, operation, options) homecoming can unless can.nil? end nil end
ruby-on-rails pry
No comments:
Post a Comment