Created
June 10, 2020 10:11
-
-
Save corroded/766f01eea615dd703eaeb63859feb9cf to your computer and use it in GitHub Desktop.
Sample user model
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
class User < ActiveRecord::Base | |
def coolifier | |
username = "#{username}...the Coolest!" | |
end | |
def make_cool | |
cool = true | |
end | |
end | |
# u = User.new(username: 'Swag') | |
# puts u.username | |
# "Swag" | |
# u.coolifier | |
# puts u.username | |
# "Swag...the coolest!" | |
# u.make_cool | |
# puts u.cool? | |
# true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment