Last active
September 8, 2017 10:17
-
-
Save morgler/507c0486350d507bf243d475c006346c to your computer and use it in GitHub Desktop.
This is WRONG code to show a pitfall with attr_accessor
This file contains hidden or 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
# Concern to be included into an ActiveModel | |
module Attendable | |
extend ActiveSupport::Concern | |
included do | |
attr_accessor :user_fees | |
end | |
def user_fees= new_user_fees | |
… | |
write_attribute(:user_fees, new_user_fees) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment