Question: when do I need to use self in my models in Rails?
I have a set method in one of my models.
class SomeData < ActiveRecord::B
It's to make sure you're using the setter method and not scoping a new variable. It's a Ruby and AR usage detail that often trips people up (the other being the (mis-)use of an instance variable).
Note there's already update_attributes! although I understand the desire to abstract.
There's also toggle!, which might be even nicer, depending on your interface to the flag.