Created
August 6, 2015 19:11
-
-
Save michaelwehrley/a4538a37430166ee2b6e to your computer and use it in GitHub Desktop.
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 Namerizer | |
def initialize(participant) | |
@first_name = participant.first_name | |
@last_name = participant.last_name | |
end | |
def name | |
@first_name + @last_name | |
end | |
end |
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 name | |
first_name + last_name | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment