Created
March 9, 2016 00:51
-
-
Save sleungcy/fc5ab5546bc60fd88c1d to your computer and use it in GitHub Desktop.
Rails question
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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