Skip to content

Instantly share code, notes, and snippets.

@hadrienblanc
Created May 15, 2019 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hadrienblanc/48862d82a9172ca4691989d0050c5ce5 to your computer and use it in GitHub Desktop.
Save hadrienblanc/48862d82a9172ca4691989d0050c5ce5 to your computer and use it in GitHub Desktop.
class User < ActiveRecord::Base
 def do_something!
   self.my_attr = 123
 end

 def do_another_thing!
   my_attr = 456
 end
end

One method will do something, the other one will do nothing. Why ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment