Skip to content

Instantly share code, notes, and snippets.

@sleungcy sleungcy/user.rb
Created Mar 9, 2016

Embed
What would you like to do?
Rails question
class User < ActiveRecord::Base
def test
puts "#{user_name.blank?}" # outputs false
if false
user_name = "this_should_never_run"
end
puts "#{user_name.blank?}" # outputs true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.